loading many queries from a file

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: loading many queries from a file
Date: 2010-06-30 22:23:52
Message-ID: AANLkTik_9_q5kzf-3NuZyB-o3IuPNUuSy9fGlYbGqHJP@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I've got a file with many SQL queries, also some function definitions and so
on. I'd like to load it to database, but using some library like
JDBC/ODBC/DBI, not using the obvious psql. Do you know how I could load
those many queries? Usually there could be loaded only one query, I saw that
psql parses the file looking for the semicolon.

Is there any other way than parsing the file and loading queries one by one?

regards
Szymon

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bidski 2010-06-30 22:30:31 Problems building from source
Previous Message Chris Browne 2010-06-30 22:22:28 Re: Postgres table contents versioning