summaryrefslogtreecommitdiff
path: root/contrib/spi/refint.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/spi/refint.c')
-rw-r--r--contrib/spi/refint.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 8dc565a190..2602210741 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -16,10 +16,6 @@
PG_MODULE_MAGIC;
-extern Datum check_primary_key(PG_FUNCTION_ARGS);
-extern Datum check_foreign_key(PG_FUNCTION_ARGS);
-
-
typedef struct
{
char *ident;
@@ -634,8 +630,7 @@ find_plan(char *ident, EPlan **eplan, int *nplans)
(*nplans) = i = 0;
}
- newp->ident = (char *) malloc(strlen(ident) + 1);
- strcpy(newp->ident, ident);
+ newp->ident = strdup(ident);
newp->nplans = 0;
newp->splan = NULL;
(*nplans)++;