Skip to content

Commit 912eb88

Browse files
committed
Remove useless codes to initialize TupleDesc from dblink_exec.
1 parent 7bfd95a commit 912eb88

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

contrib/dblink/dblink.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Darko Prenosil <Darko.Prenosil@finteh.hr>
99
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
1010
*
11-
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.89 2010/02/14 18:42:11 rhaas Exp $
11+
* $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.90 2010/02/24 05:20:49 itagaki Exp $
1212
* Copyright (c) 2001-2010, PostgreSQL Global Development Group
1313
* ALL RIGHTS RESERVED;
1414
*
@@ -1017,7 +1017,6 @@ dblink_exec(PG_FUNCTION_ARGS)
10171017
char *msg;
10181018
PGresult *res = NULL;
10191019
text *sql_cmd_status = NULL;
1020-
TupleDesc tupdesc = NULL;
10211020
PGconn *conn = NULL;
10221021
char *connstr = NULL;
10231022
char *sql = NULL;
@@ -1070,11 +1069,6 @@ dblink_exec(PG_FUNCTION_ARGS)
10701069
{
10711070
dblink_res_error(conname, res, "could not execute command", fail);
10721071

1073-
/* need a tuple descriptor representing one TEXT column */
1074-
tupdesc = CreateTemplateTupleDesc(1, false);
1075-
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
1076-
TEXTOID, -1, 0);
1077-
10781072
/*
10791073
* and save a copy of the command status string to return as our
10801074
* result tuple
@@ -1083,11 +1077,6 @@ dblink_exec(PG_FUNCTION_ARGS)
10831077
}
10841078
else if (PQresultStatus(res) == PGRES_COMMAND_OK)
10851079
{
1086-
/* need a tuple descriptor representing one TEXT column */
1087-
tupdesc = CreateTemplateTupleDesc(1, false);
1088-
TupleDescInitEntry(tupdesc, (AttrNumber) 1, "status",
1089-
TEXTOID, -1, 0);
1090-
10911080
/*
10921081
* and save a copy of the command status string to return as our
10931082
* result tuple

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy