Patch: regschema OID type

From: David Christensen <david(at)endpoint(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Patch: regschema OID type
Date: 2010-01-21 17:46:47
Message-ID: 9A048F43-C20C-4416-B83B-32CCD34E0154@endpoint.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)endpoint(dot)com

Attachment Content-Type Size
regschema.patch application/octet-stream 10.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Weimer 2010-01-21 17:48:18 Re: MySQL-ism help patch for psql
Previous Message David E. Wheeler 2010-01-21 17:42:58 Re: GUC failure on exception