Re: win32 psql syntax error running any .sql crea ted by the query editor

From: Magnus Hagander <magnus(at)hagander(dot)net>
To:
Cc: Kev <kevinjamesfield(at)gmail(dot)com>, pgadmin-support(at)postgresql(dot)org
Subject: Re: win32 psql syntax error running any .sql crea ted by the query editor
Date: 2008-04-08 07:38:10
Message-ID: 20080408093810.0763886d@mha-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Gah, that's what I get for not doublechekcing what that darn word
completion on my phone did with what I wrote :-)

That looks like it could be a *unicode* BOM. Can you open the file in a
*hex* editor and check the first couple of bytes..

//Magnus

Magnus Hagander wrote:
> Looks like it could be a knocked BOM. Can you open the file in a bed
> editor and check the first couple of bytes?
>
> /Magnus
>
> > ------- Original Message -------
> > From: Kev <kevinjamesfield(at)gmail(dot)com>
> > To: pgadmin-support(at)postgresql(dot)org
> > Sent: 08-04-07, 22:34:42
> > Subject: [pgadmin-support] win32 psql syntax error running any .sql
> > created by the query editor
> >
> > Hi,
> >
> > This is reproducible every time on my Windows 2003 Server box
> > running pgAdmin3 1.8.2 and pgsql 8.3.
> >
> > 1. Open the query editor.
> > 2. Type any valid query.
> > 3. Save.
> > 4. In a DOS box, run psql -f on the file you just saved.
> >
> > I get the following error:
> >
> > psql:path/to/test.sql:71: ERROR: syntax error at or near "п»ї"
> > LINE 1: п»їselect * from cust
> >
> > If I open the file in TextPad, it says it's of UNIX type. If I then
> > save it again using TextPad and run it, it runs fine without errors.
> >
> > This also happens even if I go Edit->Line Ends-> and choose either
> > DOS or UNIX in the query editor and then save again.
> >
> > I could be wrong, but this sounds like a bug. Thoughts or
> > suggestions?
> >
> > Thanks,
> > Kev
> >
> > --
> > Sent via pgadmin-support mailing list
> > (pgadmin-support(at)postgresql(dot)org) To make changes to your
> > subscription: http://www.postgresql.org/mailpref/pgadmin-support
> >
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2008-04-08 08:49:00 Re: Grant RULE removed in pg 8.2
Previous Message Julius Tuskenis 2008-04-08 06:29:00 Re: Removing Context Messages