On Wed, Apr 21, 2010 at 6:07 PM, John Gage <jsmg...@numericable.fr> wrote:

> I enter the identical command:
>
> select * from mesh_descriptors;
>
> using the psql command line and it works perfectly.
>
> The same command in a file produces an immediate syntax error:
>
> EFNWeb=# \i ./CopySql.sql
> psql:./CopySql.sql:1: ERROR:  syntax error at or near "select"
> LINE 1: select * from mesh_descriptors;
>
> when run from a file using \i
>
> What am I doing wrong?
>

Do you have some funky hidden characters at the beginning of the file?

   run:

   od -a CopySql.sql

  Look at the beginning, that'll show you character by character what's in
there (should reveal anything hidden).

--Scott


>
> Thanks,
>
> John Gage
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Reply via email to