syntax error for no apparent reason

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've encountered this before, psql gives me a syntax error for no clear reason. It's allways on the first character of a sql file.
I think that there must be some strange character code at the first position, maybe it is because i share a ntfs partition with the windows installation on my laptop and move files around.
I only editted this file with gedit, pgAdmin and vim on ubuntu lucid desktop.

Here's the error:

postgres=# \i db02-vulling.sql
psql:db02-vulling.sql:1: ERROR:Â syntax error at or near "ïbegin"
LINE 1: ïbegin;
ÂÂÂÂÂÂÂ ^
INSERT 0 10100
INSERT 0 101
INSERT 0 100
psql:db02-vulling.sql:12: WARNING:Â there is no transaction in progress
COMMIT
postgres=#


The file is in the attachment, both gzipped and as-is.
I hope someone can reproduce this.
(the code itself makes no sense but that's not relevant here)

WBL
--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw
ïbegin;

insert into a (val, description)
select generate_series(100,200), 'dit is nummer '||generate_series(1,100);

insert into c (val)
select generate_series(200,300);

insert into b (aid, cid)
select generate_series(1,100), generate_series(1,100);

commit;

Attachment: db02-vulling.sql.gz
Description: GNU Zip compressed data

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux