Re: Re: Get the tables names?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: dado feigenblatt <dado(at)wildbrain(dot)com>
Cc: jburton(at)scw(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Re: Get the tables names?
Date: 2001-07-23 21:56:02
Message-ID: Pine.BSF.4.21.0107231450490.56666-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Mon, 23 Jul 2001, dado feigenblatt wrote:

> > system tables all ~ '^pg', which is probably a better check than
> > user=postgresql.
>
> You never know when someone will name their tables starting with "pg".
> Well, you never know when someone will create their tables as user postgres
> either.

You probably want to check for '^pg_' since you shouldn't be able to
create user table names starting with pg_. As the administrator on my
home test system:

sszabo=> create table "pg_a"(A int);
ERROR: Illegal class name 'pg_a'
The 'pg_' name prefix is reserved for system catalogs

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David M. Richter 2001-07-24 11:11:33 Re: Query optimizing - paradox behave
Previous Message Josh Berkus 2001-07-23 19:06:11 Re: RE: position(text,text) function