Patch: regschema OID type - Mailing list pgsql-hackers

From David Christensen
Subject Patch: regschema OID type
Date
Msg-id 9A048F43-C20C-4416-B83B-32CCD34E0154@endpoint.com
Whole thread Raw
Responses Re: Patch: regschema OID type  ("David E. Wheeler" <david@kineticode.com>)
Re: Patch: regschema OID type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hey -hackers,

Enclosed is a patch adding a 'regschema' OID type.  I'm really just
hoping to get this out there, don't worry about committing it at this
point.  This is something that I've always wanted in the field (yes,
I'm lazy).  Many thanks to RhodiumToad for pointers about the
necessary system table entries and general advice.

Example usage:

machack:postgres:8555=# select relnamespace::regschema, relname from
pg_class limit 10;
     relnamespace    |           relname
--------------------+------------------------------
  pg_catalog         | pg_type
  pg_catalog         | pg_attribute
  information_schema | foreign_data_wrapper_options
  information_schema | foreign_data_wrappers
  information_schema | _pg_foreign_servers
  information_schema | foreign_server_options
  information_schema | foreign_servers
  information_schema | _pg_user_mappings
  information_schema | user_mapping_options
  information_schema | user_mappings
(10 rows)

It uses the same quoting mechanism as regclass, and I've tested
against some odd schema names such as "foo""schema"; I updated the
docs as I was able, but am not familiar enough with the regression
tests to add those yet.  I hope to address that in a future revision.

Thanks,

David
--
David Christensen
End Point Corporation
david@endpoint.com


Attachment

pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: GUC failure on exception
Next
From: Florian Weimer
Date:
Subject: Re: MySQL-ism help patch for psql