From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix regrole and regnamespace types to honor quoting like other r |
Date: | 2016-01-04 06:04:04 |
Message-ID: | E1aFyFQ-0001lD-CU@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix regrole and regnamespace types to honor quoting like other reg* types.
Aside from any consistency arguments, this is logically necessary because
the I/O functions for these types also handle numeric OID values. Without
a quoting rule it is impossible to distinguish numeric OIDs from role or
namespace names that happen to contain only digits.
Also change the to_regrole and to_regnamespace functions to dequote their
arguments. While not logically essential, this seems like a good idea
since the other to_reg* functions do it. Anyone who really wants raw
lookup of an uninterpreted name can fall back on the time-honored solution
of (SELECT oid FROM pg_namespace WHERE nspname = whatever).
Report and patch by Jim Nasby, reviewed by Michael Paquier
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/fb1227af67eae5e97795f7e3563673c6e67d2844
Modified Files
--------------
src/backend/utils/adt/regproc.c | 48 ++++++++--
src/test/regress/expected/regproc.out | 169 ++++++++++++++++++++++++---------
src/test/regress/sql/regproc.sql | 44 +++++++--
3 files changed, 201 insertions(+), 60 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-01-04 06:16:19 | Re: pgsql: Further tweaking of print_aligned_vertical(). |
Previous Message | Tom Lane | 2016-01-04 01:53:49 | pgsql: Fix bogus lock release in RemovePolicyById and RemoveRoleFromObj |