Re: [GENERAL] getting list of tables from command line

2007-11-02 Thread hubert depesz lubaczewski
On Thu, Nov 01, 2007 at 08:03:08PM -0700, Craig White wrote: > *** begin pg_table_dump.scr *** > #/bin/sh > # > # Script to identify tables, backup schema and data separately and > # then finally, vacuum each table > # > DB_NAME=MY_DB > BACKUP_PATH=/home/backup/postgres/production > MY_SCHEMA=publi

Re: [GENERAL] getting list of tables from command line

2007-11-01 Thread Craig White
On Thu, 2007-11-01 at 20:25 +0100, hubert depesz lubaczewski wrote: > On Wed, Oct 31, 2007 at 08:01:41AM -0700, Craig White wrote: > > my script looks like this... > > (all I want is to get a list of the tables into a text file pg_tables) > > everybody else showed some ways, but i'll ask a questio

Re: [GENERAL] getting list of tables from command line

2007-11-01 Thread hubert depesz lubaczewski
On Wed, Oct 31, 2007 at 08:01:41AM -0700, Craig White wrote: > my script looks like this... > (all I want is to get a list of the tables into a text file pg_tables) everybody else showed some ways, but i'll ask a question: i hope you're not treating it as a backup? bacause when you do it that way

Re: [GENERAL] getting list of tables from command line

2007-10-31 Thread Filip RembiaƂkowski
2007/10/31, Craig White <[EMAIL PROTECTED]>: > I wrote a little script to individually back up table schemas, table > data and then vacuum the table and it works nicely but I wanted a way to > query a database and get a text file with just the table names and > cannot figure out a way to do that.

Re: [GENERAL] getting list of tables from command line

2007-10-31 Thread David Fetter
On Wed, Oct 31, 2007 at 08:01:41AM -0700, Craig White wrote: > I wrote a little script to individually back up table schemas, table > data and then vacuum the table and it works nicely but I wanted a > way to query a database and get a text file with just the table > names and cannot figure out a w

Re: [GENERAL] getting list of tables from command line

2007-10-31 Thread Ron St-Pierre
Craig White wrote: I wrote a little script to individually back up table schemas, table data and then vacuum the table and it works nicely but I wanted a way to query a database and get a text file with just the table names and cannot figure out a way to do that. my script looks like this... (al

Re: [GENERAL] getting list of tables from command line

2007-10-31 Thread T.J. Adami
On 31 out, 12:01, [EMAIL PROTECTED] (Craig White) wrote: > I wrote a little script to individually back up table schemas, table > data and then vacuum the table and it works nicely but I wanted a way to > query a database and get a text file with just the table names and > cannot figure out a way t

Re: [GENERAL] getting list of tables from command line

2007-10-31 Thread Reece Hart
On Wed, 2007-10-31 at 08:01 -0700, Craig White wrote: > I wanted a way to > query a database and get a text file with just the table names and > cannot figure out a way to do that. This should do the trick: $ psql -Atc "select table_schema||'.'||table_name from information_schema.tables" -Reece