From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Make the to_reg*() functions accept text not cstring. |
Date: | 2016-01-05 18:02:50 |
Message-ID: | E1aGVwY-0002Pu-Uk@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/ea0d494dae0d3d6fce26bf5d6fbaa07e2ee6c402
Modified Files
--------------
doc/src/sgml/func.sgml | 2 +-
src/backend/utils/adt/regproc.c | 16 ++++++++--------
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 16 ++++++++--------
4 files changed, 18 insertions(+), 18 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-01-05 20:01:11 | pgsql: In opr_sanity regression test, check for unexpected uses of cstr |
Previous Message | Alvaro Herrera | 2016-01-05 17:51:42 | pgsql: Make pg_shseclabel available in early backend startup |