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
da...@endpoint.com

Attachment: regschema.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to