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

Commit3869e9a

Browse files
committed
Be a bit less cavalier with both the code and the comment for UNKNOWN fix.
1 parentff645bf commit3869e9a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.264 2010/08/1916:54:43heikki Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.265 2010/08/1917:31:43tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -5524,14 +5524,16 @@ exec_eval_using_params(PLpgSQL_execstate *estate, List *params)
55245524
if (ppd->types[i]==UNKNOWNOID)
55255525
{
55265526
/*
5527-
* Treat 'unknown' parameters as text, that's what most people
5528-
* would expect. The backend can coerce unknown constants in a
5529-
* more intelligent way, but not unknown Params.
5527+
* Treat 'unknown' parameters as text, since that's what most
5528+
* people would expect. SPI_execute_with_args can coerce unknown
5529+
* constants in a more intelligent way, but not unknown Params.
5530+
* This code also takes care of copying into the right context.
5531+
* Note we assume 'unknown' has the representation of C-string.
55305532
*/
55315533
ppd->types[i]=TEXTOID;
55325534
if (!isnull)
55335535
{
5534-
ppd->values[i]=CStringGetTextDatum((char*)ppd->values[i]);
5536+
ppd->values[i]=CStringGetTextDatum(DatumGetCString(ppd->values[i]));
55355537
ppd->freevals[i]= true;
55365538
}
55375539
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp