Re: How to query information schema from shell script

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: How to query information schema from shell script
Дата
Msg-id 20061027134631.GB25572@a-kretschmer.de
обсуждение исходный текст
Ответ на How to query information schema from shell script  ("Jon Horsman" <horshaq@gmail.com>)
Список pgsql-sql
am  Fri, dem 27.10.2006, um  9:31:03 -0400 mailte Jon Horsman folgendes:
> 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

You can do something like this:

bla=`echo "select bla from fasel" | psql -t`

You have then the result in $bla.


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47215,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


В списке pgsql-sql по дате отправления:

Предыдущее
От: "George Pavlov"
Дата:
Сообщение: Re: How to query information schema from shell script
Следующее
От: "William Leite Araújo"
Дата:
Сообщение: Re: How to query information schema from shell script