Thread: ERROR: parser: unterminated quoted string
Hi,
I'm using PostgreSQL 7.3.4 on phpPgAdmin 2.4.2 and I'm getting the following error when I try and run a SQL query on a script:
Error - /usr/local/psa/admin/htdocs/domains/databases/phpPgAdmin/db_readdump.php -- Line: 33
PostgreSQL said: ERROR: parser: unterminated quoted string at or near "'Black Tea\015\012Fresh range of leaf tea for drinking black or with milk,\015\012including Ceylons, Assams and favourites like Irish Breakfast.\015\012\015\012Green Tea\015\012First quality Japanese & Chinese popular green teas, including Bancha, Genmaicha & flavoured green teas.\015\012\015\012Flavoured Tea\015\012Exotic and delicious, favourites are Vanilla, Arctic Fire & Lady Grey.\015\012\015\012Herbal Infusions\015\012Pure flowers and whole leaves of calming herbs, & a\015\012delightful range of specially blended herbal infusions Fruit Melanges;" at character 566
Any idea as to why this is doing this?
Thank you for your help.
Dan
On Wed, Sep 08, 2004 at 04:05:10PM +1000, Daniel Secomb wrote: > Hi, > > I'm using PostgreSQL 7.3.4 on phpPgAdmin 2.4.2 and I'm getting the following > error when I try and run a SQL query on a script: > > Error - > /usr/local/psa/admin/htdocs/domains/databases/phpPgAdmin/db_readdump.php -- > Line: 33 > PostgreSQL said: ERROR: parser: unterminated quoted string at or near > "'Black Tea\015\012Fresh range of leaf tea for drinking black or with > milk,\015\012including Ceylons, Assams and favourites like Irish > Breakfast.\015\012\015\012Green Tea\015\012First quality Japanese & Chinese > popular green teas, including Bancha, Genmaicha & flavoured green > teas.\015\012\015\012Flavoured Tea\015\012Exotic and delicious, favourites > are Vanilla, Arctic Fire & Lady Grey.\015\012\015\012Herbal > Infusions\015\012Pure flowers and whole leaves of calming herbs, & > a\015\012delightful range of specially blended herbal infusions Fruit > Melanges;" at character 566 > > > > Any idea as to why this is doing this? Hi Daniel, Without seeing the entire query I can't be sure, but I'm guessing there should be a single quote after "Melanges" and before the semicolon. (Remember that all strings in Postgres need to be in single quotes, so unless the semicolon is actually part of the string and not the SQL statement, that's the cause of the syntax error.) HTH, Jeremy
--- Daniel Secomb <dan@ds-d.com> wrote: > Hi, > > I'm using PostgreSQL 7.3.4 on phpPgAdmin 2.4.2 and > I'm getting the following > error when I try and run a SQL query on a script: > > Error - > /usr/local/psa/admin/htdocs/domains/databases/phpPgAdmin/db_readdump.php > -- > Line: 33 > PostgreSQL said: ERROR: parser: unterminated quoted > string at or near > "'Black Tea\015\012Fresh range of leaf tea for > drinking black or with > milk,\015\012including Ceylons, Assams and > favourites like Irish > Breakfast.\015\012\015\012Green Tea\015\012First > quality Japanese & Chinese > popular green teas, including Bancha, Genmaicha & > flavoured green > teas.\015\012\015\012Flavoured Tea\015\012Exotic and > delicious, favourites > are Vanilla, Arctic Fire & Lady > Grey.\015\012\015\012Herbal > Infusions\015\012Pure flowers and whole leaves of > calming herbs, & > a\015\012delightful range of specially blended > herbal infusions Fruit > Melanges;" at character 566 > > > > Any idea as to why this is doing this? Because there is an unterminated quoted string? I see a single quote just before "Black Tea", but I don't see another anywhere in that string. > > Thank you for your help. > > Dan > __________________________________ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail