Re: sql files in psql ? - Mailing list pgsql-novice

From Tom Lane
Subject Re: sql files in psql ?
Date
Msg-id 19627.1275340485@sss.pgh.pa.us
Whole thread Raw
In response to sql files in psql ?  (Mariateresa L <mariateresa.ll@bresciaonline.it>)
Responses Re: sql files in psql ?
List pgsql-novice
Mariateresa L <mariateresa.ll@bresciaonline.it> writes:
> ... 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".

Really?  Works for most people.

> Am I uber-newbie or is this a known limitation of psql?

Well, you need to learn something about submitting trouble reports.
Show us exactly what you did (including what's in the file) and
exactly what error messages you got, rather than telling us what your
interpretation of the problem is.

            regards, tom lane

pgsql-novice by date:

Previous
From: Mariateresa L
Date:
Subject: Fwd: psql in bash scrpts, is possible ?
Next
From: Lonni J Friedman
Date:
Subject: Re: psql in bash scrpts, is possible ?