There has been a great deal of rubbish written on this subject, and I wish to add to that vast body of work with my commentary this month. When we call on somebody to mind their Ps and Qs or their p's and q's or any other variant of the above, we are encouraging them to be careful about the detail of what they are doing, mid their manners and generally behave in a gentlemanly or ladylike manner, as appropriate.
I will start by disposing of some popular misconceptions as to where this curious phrase has come from. First, it is not a contraction of "pleases" and "thank-yous", although I believe that there is a certain charm in this explanation. In a way, I am sorry that it is not correct, because it is a very elegant invention.
The second misconception is that it is an encouragement to watch your "pints" and "quarts". Again, a plausible suggestion: if we drink pints of beer and quarts of beer, then by the time we have finished our manners will be sure to suffer. For those of you unversed in the imperial system of weights and measures, a pint is twenty fluid ounces or 567 millilitres (567 ml), while a quart (a quarter of a gallon) is twice as much, 1134 millilitres (1.134 l). May I please digress for a moment and talk about pints.
American visitors will be disturbed by my claim that a pint is 20 ounces, as they understand it to be 16, the same as the number of ounces in a pound. Indeed, they have a rhyme which says "A pint's a pound, the whole world round". Unfortunately, this isn't right. I grew up with my English grandma's rhyming couplet which stated something quite different: "A pint of still water weighs a pound and a quarter". The two sides of the Atlantic disagree on this point, as on many others, so let us move on. As far as I know, New Zealand, so far as they still have such things, thinks a pint is 20 ounces. Can any Canadians tell me what a pint is worth in Canada? Maybe John Davy (not his real name?) can tell me before he goes home...
Back to the Ps and Qs. In the old days, any printed document would be printed using movable type. Each letter or character would be on a single piece of lead, and these would be removed from a case of letters. For large documents, capital letters would be stored in a case at a higher level (upper case) while little letters would be stored in a lower case, from which we get those terms. However, because they were inked and then pressed against paper, they were reversed. So that the piece of lead for "p" looked like a "q", while the piece for a "q" looked like a "p". So we should indeed mind our ps and qs. We should mind our bs and ds as well, but that phrase never caught on.
Finally, just to catch the interest of the search engines, Never mind your P's and Q's just T's. Casual Tease. Ask me if you want to know what this is all about.