Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad98575

Browse files
committed
Use SQL standard '' rather than \' for tutorial/sample code.
Backpatch to 8.1.X.
1 parent637028a commitad98575

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/interfaces/ecpg/test/test1.pgc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ exec sql end declare section;
8787
exec sql execute immediate :command;
8888
printf("New tuple got OID = %ld\n", sqlca.sqlerrd[1]);
8989

90-
sprintf(command, "insert into \"Test\" (name, amount, letter) values ('db:\\\'mm\\\'', 2, 't')");
90+
sprintf(command, "insert into \"Test\" (name, amount, letter) values ('db:''mm''', 2, 't')");
9191
exec sql execute immediate :command;
9292

9393
strcpy(msg, "execute insert 2");

‎src/tutorial/funcs.source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--
77
-- Copyright (c) 1994-5, Regents of the University of California
88
--
9-
-- $PostgreSQL: pgsql/src/tutorial/funcs.source,v 1.8 2006/02/27 16:09:50 petere Exp $
9+
-- $PostgreSQL: pgsql/src/tutorial/funcs.source,v 1.9 2006/05/11 19:21:14 momjian Exp $
1010
--
1111
---------------------------------------------------------------------------
1212

@@ -76,10 +76,10 @@ WHERE EMP.cubicle ~= '(2,1)'::point;
7676
-- columns of EMP.
7777

7878
CREATE FUNCTION new_emp() RETURNS EMP
79-
AS 'SELECT\'None\'::text AS name,
79+
AS 'SELECT''None''::text AS name,
8080
1000 AS salary,
8181
25 AS age,
82-
\'(2,2)\'::point AS cubicle'
82+
''(2,2)''::point AS cubicle'
8383
LANGUAGE SQL;
8484

8585
-- you can then project a column out of resulting the tuple by using the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp