Re: How to check is the table system
От | Jim C. Nasby |
---|---|
Тема | Re: How to check is the table system |
Дата | |
Msg-id | 20050918135907.GR7630@pervasive.com обсуждение исходный текст |
Ответ на | How to check is the table system (Андрей <andyk@softwarium.net>) |
Список | pgsql-general |
On Thu, Sep 15, 2005 at 09:12:44PM +0300, ???????????? wrote: > Hello! > > In what way can I determine is the table system? ODBC driver does it > by checking table name's prefix: if it begins with 'pg_' - driver > desides that the table is system, but that's a bad idea. I can create > table and call it 'pg_mytable', but it won't become system! From http://lnk.nu/cvs.pgfoundry.org/3yb.sql: -- Note that generic case would be "select $1 like ''pg!_%'' escape ''!'' create or replace function _pg_sv_system_schema(name) returns boolean as 'select $1 in (name ''pg_catalog'', name ''pg_toast'', name ''pg_sysviews'', name ''information_schema'')' language sql immutable strict; create or replace function _pg_sv_temp_schema(name) returns boolean as 'select $1 like ''pg!_temp!_%'' escape ''!'' ' language sql immutable strict; Of course, as others have mentioned, that won't work if you're pre-schemas. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-general по дате отправления: