Re: [SQL] Get the tables names?

2001-07-22 Thread D'Arcy J.M. Cain
Thus spake Roberto Mello > On Thu, Jul 19, 2001 at 11:04:40AM +0200, Magnus Landahl wrote: > > Hi everybody! > > > > Is it possible to get the names of all tables in the database with a sql > > query?? > > SELECT tablename FROM pg_tables WHERE tablename NOT LIKE '%pg_%'; > > The "NOT LIKE

Re: [SQL] Get the tables names?

2001-07-20 Thread Tom Lane
Dado Feigenblatt <[EMAIL PROTECTED]> writes: > The only thing is that this includes system tables. > So if you want to strip those you need to > SELECT relname , relowner FROM pg_class WHERE relkind = 'r' and > relowner != 26; > Is user postgres always 26? It certainly is not. Even if it w

Re: [SQL] Get the tables names?

2001-07-20 Thread Dado Feigenblatt
Magnus Landahl wrote: >Hi everybody! > >Is it possible to get the names of all tables in the database with a sql >query?? > >Best regards, > >Magnus > > > >---(end of broadcast)--- >TIP 3: if posting/reading through Usenet, please send an appropriat

Re: [SQL] Get the tables names?

2001-07-20 Thread Roberto Mello
On Thu, Jul 19, 2001 at 11:04:40AM +0200, Magnus Landahl wrote: > Hi everybody! > > Is it possible to get the names of all tables in the database with a sql > query?? SELECT tablename FROM pg_tables WHERE tablename NOT LIKE '%pg_%'; The "NOT LIKE" part is to avoid getting the PostgreSQL

[SQL] Get the tables names?

2001-07-20 Thread Magnus Landahl
Hi everybody! Is it possible to get the names of all tables in the database with a sql query?? Best regards, Magnus ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL