Identical command-line command will not work with \i metacommand and filename

From: John Gage <jsmgage(at)numericable(dot)fr>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Identical command-line command will not work with \i metacommand and filename
Date: 2010-04-21 22:07:10
Message-ID: 2B3E547C-F226-48E4-BA31-B81532C57F20@numericable.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

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?

Thanks,

John Gage

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Scott Mead 2010-04-22 01:34:17 Re: Identical command-line command will not work with \i metacommand and filename
Previous Message Guillaume Lelarge 2010-04-20 22:11:15 Re: Deactivated options

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Vanasco 2010-04-21 23:55:42 trying to write a bit of logic as one query, can't seem to do it under 2
Previous Message Thom Brown 2010-04-21 21:30:16 Re: Listing tables in all schemas in psql