Re: How to query pgsql from a BASH script ?
От | Michelle Konzack |
---|---|
Тема | Re: How to query pgsql from a BASH script ? |
Дата | |
Msg-id | 20050403171028.GH15347@freenet.de обсуждение исходный текст |
Ответ на | Re: How to query pgsql from a BASH script ? (Pavel Stehule <stehule@kix.fsv.cvut.cz>) |
Ответы |
Re: How to query pgsql from a BASH script ?
|
Список | pgsql-general |
Hello Pavel, Am 2005-04-03 16:36:47, schrieb Pavel Stehule: > Hello, > > There is more solutions. The best is pgbash (pgbash is patch for bash) > http://www.psn.co.jp/PostgreSQL/pgbash/index-e.html Wow... realy cool. Unfortunatly I can not get the bash-2.0.5a tarball - ServerError I will try to apply the patch to the version in Debian WOODY... > and last two months there somebody released new functions for bash and > postgresql but I can't remember <example> I was reading the Website, FAO and Examples... But some things are confusing. I need only a simple returnvalue of a FULL_ROW (one String, where $FIELD are seperated by whitespace) from a SEARCH in the first $COL (uniq). So if I understand it right, if I have a table like Table: ip_table ip | ctime | atime ----------------+------------+------------ aaa.bbb.ccc.ddd | 1234567890 | 2345678901 eee.fff.ggg.hhh | 3456789012 | 4567890123 and I need only CONNECT TO localhost USER michelle.konzack; RETVAL=`SELECT ctime, atime FROM ip_table WHERE ip = $SEARCH;` ? > regards > Pavel Stehule Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Вложения
В списке pgsql-general по дате отправления: