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

Commit8a2cdd7

Browse files
committed
EXECUTE of a SELECT ... INTO now draws a 'not implemented' error,
rather than executing the INTO clause with non-plpgsql semanticsas it was doing for the last few weeks/months. This keeps our optionsopen for making it do the right plpgsql-ish thing in future withoutcreating a backwards compatibility problem. There is no loss offunctionality since people can get the same behavior with CREATE TABLE AS.
1 parentbbac19a commit8a2cdd7

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

‎src/pl/plpgsql/src/pl_exec.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.36 2001/01/22 00:50:07 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.37 2001/02/09 00:14:26 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -1993,7 +1993,6 @@ exec_stmt_dynexecute(PLpgSQL_execstate * estate,
19931993
switch (exec_res)
19941994
{
19951995
caseSPI_OK_SELECT:
1996-
caseSPI_OK_SELINTO:
19971996
caseSPI_OK_INSERT:
19981997
caseSPI_OK_UPDATE:
19991998
caseSPI_OK_DELETE:
@@ -2006,6 +2005,16 @@ exec_stmt_dynexecute(PLpgSQL_execstate * estate,
20062005
*/
20072006
break;
20082007

2008+
caseSPI_OK_SELINTO:
2009+
/*
2010+
* Disallow this for now, because its behavior is not consistent
2011+
* with SELECT INTO in a normal plpgsql context. We need to
2012+
* reimplement EXECUTE to parse the string as a plpgsql command,
2013+
* not just feed it to SPI_exec.
2014+
*/
2015+
elog(ERROR,"EXECUTE of SELECT ... INTO is not implemented yet");
2016+
break;
2017+
20092018
default:
20102019
elog(ERROR,"unexpected error %d in EXECUTE of query '%s'",
20112020
exec_res,querystr);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp