How to query pgsql from a BASH script ?

Поиск
Список
Период
Сортировка
От Michelle Konzack
Тема How to query pgsql from a BASH script ?
Дата
Msg-id 20050403141615.GD15347@freenet.de
обсуждение исходный текст
Ответы Re: How to query pgsql from a BASH script ?
Re: How to query pgsql from a BASH script ?
Список 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)

Вложения

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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Empty date
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Empty date