Re: How to query information schema from shell script - Mailing list pgsql-sql

From William Leite Araújo
Subject Re: How to query information schema from shell script
Date
Msg-id bc63ad820610270655h5bbc4fd4n797a7ea3d7e3bcdd@mail.gmail.com
Whole thread Raw
In response to How to query information schema from shell script  ("Jon Horsman" <horshaq@gmail.com>)
Responses Re: How to query information schema from shell script  ("Jon Horsman" <horshaq@gmail.com>)
List pgsql-sql
     You can use "-c" option of psql client.
     Ex.: psql -p 5000 -d database -c "SELECT * FROM information_schema.tables WHERE table_schema = 'public'"

   

2006/10/27, Jon Horsman <horshaq@gmail.com>:
Hey,

I'm trying to figure out how i can query the postgres information
schema from a bourne shell script on linux.  I need to know if a
user/table exists.  Does someone mind giving me a quick example of how
this works, is this possible?

Thanks,

Jon.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



--
William Leite Araújo

pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: How to query information schema from shell script
Next
From: "Jon Horsman"
Date:
Subject: Re: How to query information schema from shell script