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");
--
-- 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 $
--
---------------------------------------------------------------------------
-- 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