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

2010-04-24 Thread Bruce Momjian
John Gage wrote: > > http://en.wikipedia.org/wiki/Byte_order_mark > > > > Tends to get added if you go through a Windows system. Useless for > > utf-8 afaik. Confuse the hell out of you because various tools parse > > and hide them then you pipe the file to a script and everything > > falls o

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

2010-04-22 Thread John Gage
http://en.wikipedia.org/wiki/Byte_order_mark Tends to get added if you go through a Windows system. Useless for utf-8 afaik. Confuse the hell out of you because various tools parse and hide them then you pipe the file to a script and everything falls over. Bunch of scripts available here

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

2010-04-22 Thread Richard Huxton
On 22/04/10 08:24, John Gage wrote: Yeesh. What the ding-dong is this? JohnGage:EFNWebsite johngage$ od -a CopySql.sql 000 ? ? ? s e l e c t sp * sp f r o m 020 sp m e s h _ d e s c r i p t o r 040 s ; nl nl What are the ?'s. Mon Dieu, what is going on? http://en.wikipedia.org/wi

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

2010-04-22 Thread John Gage
Oh, I should add. Everything, the database, vim, is UTF-8. On Apr 22, 2010, at 3:34 AM, Scott Mead wrote: run: od -a CopySql.sql Look at the beginning, that'll show you character by character what's in there (should reveal anything hidden). -- Sent via pgsql-general mailing lis

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

2010-04-22 Thread John Gage
Yeesh. What the ding-dong is this? JohnGage:EFNWebsite johngage$ od -a CopySql.sql 000? ? ? s e l e c t sp * sp f r o m 020 sp m e s h _ d e s c r i p t o r 040s ; nl nl What are the ?'s. Mon Dieu, what is goin

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

2010-04-21 Thread Scott Mead
On Wed, Apr 21, 2010 at 6:07 PM, John Gage 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: E

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

2010-04-21 Thread John Gage
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 mes