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

Commit3feb6ac

Browse files
committed
Check after errors of SPI_execute() in xml.c
SPI gets used to build a list of relation OIDs for XML objectgeneration, and one code path building a list uses SPI_execute() withoutlooking at errors it produces. So fix that.Author: Mark DilgerReviewed-by: Michael Paquier, Pavel StehuleDiscussion:https://postgr.es/m/17d30445-4862-7917-170f-84328dcd292d@gmail.com
1 parent6e3e6cc commit3feb6ac

File tree

1 file changed

+5
-1
lines changed
  • src/backend/utils/adt

1 file changed

+5
-1
lines changed

‎src/backend/utils/adt/xml.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2461,8 +2461,12 @@ query_to_oid_list(const char *query)
24612461
{
24622462
uint64i;
24632463
List*list=NIL;
2464+
intspi_result;
24642465

2465-
SPI_execute(query, true,0);
2466+
spi_result=SPI_execute(query, true,0);
2467+
if (spi_result!=SPI_OK_SELECT)
2468+
elog(ERROR,"SPI_execute returned %s for %s",
2469+
SPI_result_code_string(spi_result),query);
24662470

24672471
for (i=0;i<SPI_processed;i++)
24682472
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp