From: | Michelle Konzack <linux4michelle(at)freenet(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | How to query pgsql from a BASH script ? |
Date: | 2005-04-03 14:16:15 |
Message-ID: | 20050403141615.GD15347@freenet.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello *,
I am puzzeling around, how to query a postgresql from a BASH script.
Generaly it must do nothing else as
1) Get VALUEs from a DB/TABLE
e.g.
program --db pgsql.sld.tld --search "$COLNAME,$VAL" \
--get "COL1,COL3,COL4,..."
2) Write one or more new VALUEs in the DB/TABLE
e.g.
program --db pgsql.sld.tld --search "$COLNAME,$VAL" \
--set "COL1:VAL1,COL3:VAL3,..."
3) Remove ROWS from the DB/TABLE
e.g.
program --db pgsql.sld.tld --search "$COLNAME,$VAL" --remove
Curently I have only a sulution with a text/plain file but
there is a problem with locking and the file is already
180 kByte, which mean grep/cut/sed are to slow for it.
Under "heavy" load I need to access the database around
1-3 times (maybe in the future more) per second.
Any suggestions ?
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)
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2005-04-03 14:36:47 | Re: How to query pgsql from a BASH script ? |
Previous Message | Karsten Hilbert | 2005-04-03 13:46:18 | Re: Empty date |