win32 psql syntax error running any .sql created by the query editor
win32 psql syntax error running any .sql created by the query editor
От:
Kev <kevinjamesfield@gmail.com>
Дата:
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
Re: win32 psql syntax error running any .sql created by the query editor
От:
Raymond O'Donnell <rod@iol.ie>
Дата:
On 07/04/2008 21:34, Kev wrote: > 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. This may or may not be related, but there's a funny I see from time to time using PgAdmin 1.8 on Windows XP. Sometimes, when I open a file in the query editor, it reports that the lines have mixed endings, and they'll be corrected on the next save - and this is even though the file was created from the query editor in the first place, and had never been opened by anything else. Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------