Re: input/output functions have been changed ?
От | Tom Lane |
---|---|
Тема | Re: input/output functions have been changed ? |
Дата | |
Msg-id | 17184.961040565@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | input/output functions have been changed ? ("Hiroshi Inoue" <Inoue@tpf.co.jp>) |
Ответы |
RE: input/output functions have been changed ?
|
Список | pgsql-hackers |
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes: > I just want to confirm if input/output functions have > been changed. > select int4out(1); > int4out > ----------- > 136475032 > (1 row) Sure, you expected something nicer? You're seeing the numeric representation of a C string pointer. Actually, checking 6.5, I see that int4out --- alone of all the *out functions --- used to be declared in pg_proc to return type 'name'. All the other ones are declared to return type 'int4', which means if you invoke them explicitly as in the above example, you'll see the numeric equivalent of whatever pointer value they return. 'name' is not a correct declaration either since it implies a string of < NAMEDATALEN chars, but it would have happened to produce the right sort of results. I changed int4out to be the same as the other *out functions recently, just for consistency's sake. Really the right fix is to assign a real type OID to represent "C string" so that the argument and return types of input/output functions can be declared honestly. We've talked about that before, and I've been thinking about making a concrete proposal for it, but haven't done anything yet... regards, tom lane
В списке pgsql-hackers по дате отправления: