]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Use SQL standard '' rather than \' for tutorial/sample code.
authorBruce Momjian <bruce@momjian.us>
Thu, 11 May 2006 19:21:31 +0000 (19:21 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 11 May 2006 19:21:31 +0000 (19:21 +0000)
Backpatch to 8.1.X.

src/interfaces/ecpg/test/test1.pgc
src/tutorial/funcs.source

index 9f784ac79944bd465c2e370b59ddcefc1dc7d475..a7dba4711de90699af0c5091e548ea261c9ac858 100644 (file)
@@ -84,7 +84,7 @@ exec sql end declare section;
         exec sql execute immediate :command;
        printf("New tuple got OID = %ld\n", sqlca.sqlerrd[1]);
  
-        sprintf(command, "insert into \"Test\" (name, amount, letter) values ('db: \\\'mm\\\'', 2, 't')");
+        sprintf(command, "insert into \"Test\" (name, amount, letter) values ('db: ''mm''', 2, 't')");
         exec sql execute immediate :command;
 
         strcpy(msg, "execute insert 2");
index 4dfdf278333d92ed97259d59630fb45fe1c6f758..bf342d181067985595d6868260c9a17369c64533 100644 (file)
@@ -6,7 +6,7 @@
 --
 -- Copyright (c) 1994-5, Regents of the University of California
 --
--- $PostgreSQL: pgsql/src/tutorial/funcs.source,v 1.7 2003/11/29 22:41:33 pgsql Exp $
+-- $PostgreSQL: pgsql/src/tutorial/funcs.source,v 1.7.6.1 2006/05/11 19:21:31 momjian Exp $
 --
 ---------------------------------------------------------------------------
 
@@ -76,10 +76,10 @@ WHERE EMP.cubicle ~= '(2,1)'::point;
 -- columns of EMP.
 
 CREATE FUNCTION new_emp() RETURNS EMP
-   AS 'SELECT \'None\'::text AS name,
+   AS 'SELECT ''None''::text AS name,
                          1000 AS salary,
                          25 AS age,
-                         \'(2,2)\'::point AS cubicle'
+                         ''(2,2)''::point AS cubicle'
    LANGUAGE 'sql';
 
 -- you can then project a column out of resulting the tuple by using the