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

Поиск
Список
Период
Сортировка
От Scott Mead
Тема Re: Identical command-line command will not work with \i metacommand and filename
Дата
Msg-id t2hd3ab2ec81004211834z83bfec20t153b01554e4a7929@mail.gmail.com
обсуждение исходный текст
Ответ на Identical command-line command will not work with \i metacommand and filename  (John Gage <jsmgage@numericable.fr>)
Ответы Re: Identical command-line command will not work with \i metacommand and filename  (John Gage <jsmgage@numericable.fr>)
Re: Identical command-line command will not work with \i metacommand and filename  (John Gage <jsmgage@numericable.fr>)
Список pgsql-general

On Wed, Apr 21, 2010 at 6:07 PM, John Gage <jsmgage@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

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

Предыдущее
От: Jonathan Vanasco
Дата:
Сообщение: Re: trying to write a bit of logic as one query, can't seem to do it under 2
Следующее
От: Glen Parker
Дата:
Сообщение: Re: trying to write a bit of logic as one query, can't seem to do it under 2