sql files in psql ?

Поиск
Список
Период
Сортировка
От Mariateresa L
Тема sql files in psql ?
Дата
Msg-id 4C0424A2.1010303@bresciaonline.it
обсуждение исходный текст
Ответы Re: sql files in psql ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: sql files in psql ?  (Joe Brenner <doom@kzsu.stanford.edu>)
Список pgsql-novice
Hello everyone,

I'm building a small newspaper informations aggregator around postgresql
8.3 and Ubuntu 9.10.
Starting from a previous experience on Oracle DB, I've built
and tested a bunch of functions, triggers, SQL scripts etc...
that work flawlessly (almost !) when I submit them by hand
in psql; now I want to pack everything in a nice shell script,
with proper error control, automated file shuffling,
predefined queries in text files and so on, but I cannot
convince psql that the SQL commands (select, insert or
copy...) it has to handle come from a file.
I can submit  ("\i filename" or "psql --file filename")
files that contains commands, eg starting with "\" but
psql does not understand the same sintax if tne file
contains a simple "SELECT * FROM tablex".

Am I uber-newbie or is this a known limitation of psql?
And, in this case, there is something to overcome this
limit and afford my non-techie user to launch a simple
command to print her data or to bulk update tables ?

P.S. Initially I discarded the use of procedural
languages (C or ...) for a quick and simpler solution !

Thanks in advance

Fabio, from North Italy

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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Setting up postgresql-8.3 on Debian
Следующее
От: Mariateresa L
Дата:
Сообщение: Fwd: psql in bash scrpts, is possible ?