Avoid use of E'', and thereby creating an unnecessary version-dependency,
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 19:12:09 +0000 (19:12 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 19:12:09 +0000 (19:12 +0000)
by using LIKE...ESCAPE instead.  Per suggestion by andrew@supernews.

src/bin/pg_dump/pg_dumpall.c

index 69c1ac0b95d64836403c68dfb240877a67128b75..5a1360ecba7faa322ee1a456aad7559a603ae86e 100644 (file)
@@ -543,10 +543,10 @@ dumpTablespaces(PGconn *conn)
         * pg_xxx)
         */
        res = executeQuery(conn, "SELECT spcname, "
-                                        "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, "
+                                          "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, "
                                           "spclocation, spcacl "
                                           "FROM pg_catalog.pg_tablespace "
-                                          "WHERE spcname NOT LIKE E'pg\\_%'");
+                                          "WHERE spcname NOT LIKE 'pg!_%' ESCAPE '!'");
 
        if (PQntuples(res) > 0)
                printf("--\n-- Tablespaces\n--\n\n");