Re: type conversion discussion
От | Tom Lane |
---|---|
Тема | Re: type conversion discussion |
Дата | |
Msg-id | 28567.958420203@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: type conversion discussion (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
Peter Eisentraut <peter_e@gmx.net> writes: >> if you wanted to refer to a specific row by OID. However, while it >> might be logically purer to insist that OIDs are not numbers, it's just >> too damn handy to be laxer about the distinction. > Definitely. But wouldn't three (or six) extra `=' operators be the road of > least resistance or clearest separation? Not sure. Actually, that's what we've got now: "oid = 1234" gets parsed into the oideqint4 operator. What bugs me about that is the shenanigans the optimizer has to pull to use an index on the oid column. I'm hoping that we can clean up this mess enough so that the operator delivered by the parser is the same thing the column's index claims to use in the first place. > One thing to keep in mind in any case is that oids might not be int4-like > forever, eventually we might want int8, or the unsigned version thereof. Agreed, but with any luck that case will work transparently too: the constant will just get promoted up to int8 before we apply the operator. regards, tom lane
В списке pgsql-hackers по дате отправления: