Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 240f19a

Browse files
committed
Fixed elog 'connection to myself...'
1 parent 7340d1b commit 240f19a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/udf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,13 @@ alter_system_c(PG_FUNCTION_ARGS)
413413
connstr = SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1);
414414

415415
conn = PQconnectdb(connstr);
416-
SPI_finish(); /* Can't do earlier since connstr is allocated there */
417416
if (PQstatus(conn) != CONNECTION_OK)
418417
{
419418
PQfinish(conn);
420419
elog(ERROR, "Connection to myself with connstr %s failed", connstr);
421420

422421
}
422+
SPI_finish(); /* Can't do earlier since connstr is allocated there */
423423
res = PQexec(conn, cmd);
424424
if (PQresultStatus(res) != PGRES_COMMAND_OK)
425425
{

0 commit comments

Comments
 (0)