]> granicus.if.org Git - postgresql/commit
Make the to_reg*() functions accept text not cstring.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 Jan 2016 18:02:43 +0000 (13:02 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 Jan 2016 18:02:43 +0000 (13:02 -0500)
commitea0d494dae0d3d6fce26bf5d6fbaa07e2ee6c402
tree48a2fcde511e2a8ec9870b614fd8e7f04f2bad6c
parentefa318bcfac132c48dff8196f726e56a6843f06b
Make the to_reg*() functions accept text not cstring.

Using cstring as the input type was a poor decision, because that's not
really a full-fledged type.  In particular, it lacks implicit coercions
from text or varchar, meaning that usages like to_regproc('foo'||'bar')
wouldn't work; basically the only case that did work without explicit
casting was a simple literal constant argument.

The lack of field complaints about this suggests that hardly anyone
is using these functions, so hopefully fixing it won't cause much of
a compatibility problem.  They've only been there since 9.4, anyway.

Petr Korobeinikov
doc/src/sgml/func.sgml
src/backend/utils/adt/regproc.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h