In 8.1 and HEAD, if a role has escape_string_warning enabled then
vacuumlo elicits the following warning:

WARNING:  nonstandard use of \\ in a string literal at character 323
HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.

How backward compatible should vacuumlo remain?  This patch changes
the string to E'...' but other ways would be to use dollar quotes
or ESCAPE.

-- 
Michael Fuhr
Index: contrib/vacuumlo/vacuumlo.c
===================================================================
RCS file: /projects/cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v
retrieving revision 1.30
diff -c -r1.30 vacuumlo.c
*** contrib/vacuumlo/vacuumlo.c 15 Oct 2005 02:49:08 -0000      1.30
--- contrib/vacuumlo/vacuumlo.c 23 Feb 2006 16:17:11 -0000
***************
*** 167,173 ****
        strcat(buf, "      AND c.relnamespace = s.oid ");
        strcat(buf, "      AND t.typname in ('oid', 'lo') ");
        strcat(buf, "      AND c.relkind = 'r'");
!       strcat(buf, "      AND s.nspname NOT LIKE 'pg\\\\_%'");
        res = PQexec(conn, buf);
        if (PQresultStatus(res) != PGRES_TUPLES_OK)
        {
--- 167,173 ----
        strcat(buf, "      AND c.relnamespace = s.oid ");
        strcat(buf, "      AND t.typname in ('oid', 'lo') ");
        strcat(buf, "      AND c.relkind = 'r'");
!       strcat(buf, "      AND s.nspname NOT LIKE E'pg\\\\_%'");
        res = PQexec(conn, buf);
        if (PQresultStatus(res) != PGRES_TUPLES_OK)
        {
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to