Jim Nasby <jim.na...@bluetreble.com> writes: > On 1/3/16 9:23 PM, Tom Lane wrote: >> (Though at least in HEAD we ought to >> fix them to take type text as input. Using cstring for ordinary functions >> is just sloppy.)
> BTW, *all* the reg*in() functions do that... Yeah, I noticed that. They're all broken. There are no other built-in functions that take cstring except for datatype input functions and encoding conversion functions, which are required to by their respective meta-APIs, and which are not meant to be invoked directly from SQL. These functions had no business being the first to think that cstring is a full fledged type; which it is not. Notably, that means this doesn't work: regression=# select to_regrole('foo'::text); ERROR: function to_regrole(text) does not exist and most other cases where you'd computed an input value rather than merely typed in a literal would fail likewise. It's not a release stopper, but I plan to fix it in HEAD whenever I have an idle hour. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers