escape string syntax and pg_dumpall - Mailing list pgsql-hackers

From Patrick Welche
Subject escape string syntax and pg_dumpall
Date
Msg-id 20050718165450.GF10209@quartz.newn.cam.ac.uk
Whole thread Raw
Responses Re: escape string syntax and pg_dumpall  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I just ran pg_dumpall from today's CVS against a 14 April server - I got:

pg_dumpall: query failed: ERROR:  type "e" does not exist
pg_dumpall: query was: SELECT spcname, pg_catalog.pg_get_userbyid(spcowner) AS spcowner, spclocation, spcacl FROM
pg_catalog.pg_tablespaceWHERE spcname NOT LIKE E'pg\_%'
 

That comes from v1.62 of pg_dumpall.c :
   res = executeQuery(conn, "SELECT spcname, "                    "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, "
                   "spclocation, spcacl "                      "FROM pg_catalog.pg_tablespace "
"WHEREspcname NOT LIKE E'pg\\_%'");
 

----------------------------
revision 1.62
date: 2005/06/26 03:03:48;  author: momjian;  state: Exp;  lines: +2 -2
Add E'' syntax so eventually normal strings can treat backslashes
literally.

Add GUC variables:
       "escape_string_warning" - warn about backslashes in non-E strings       "escape_string_syntax" - supports E''
syntax?      "standard_compliant_strings" - treats backslashes literally in ''
 

Update code to use E'' when escapes are used.
----------------------------


My version of the server predates those GUC settings - could the code
be assuming that my server can cope with something it can't?
(Normally I would just upgrade everything - and I bet it will work -
but, I think we still recommend that people use new pg_dumpall to
dump their old server when upgrading..)

Cheers,

Patrick


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Toward pg_upgrade
Next
From: Tom Lane
Date:
Subject: Re: escape string syntax and pg_dumpall