summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim B. Mikheev1997-09-12 04:58:59 +0000
committerVadim B. Mikheev1997-09-12 04:58:59 +0000
commit7f97e05b094a691594b08836725b4628f5e05cac (patch)
treed335e9751331e744a7db88beec28525fac96dd3b
parent1ea01720d53095641205753e766180508ee4d5ad (diff)
char* --> Datum
-rw-r--r--contrib/spi/refint.c10
-rw-r--r--src/include/executor/spi.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index 9a6c72a404e..36f451308bb 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -42,7 +42,7 @@ check_primary_key()
int nargs; /* # of args specified in CREATE TRIGGER */
char **args; /* arguments: column names and table name */
int nkeys; /* # of key columns (= nargs / 2) */
- char **kvals; /* key values */
+ Datum *kvals; /* key values */
char *relname; /* referenced relation name */
Relation rel; /* triggered relation */
HeapTuple tuple = NULL; /* tuple to return */
@@ -107,7 +107,7 @@ check_primary_key()
* We use SPI plan preparation feature, so allocate space to place key
* values.
*/
- kvals = (char **) palloc(nkeys * sizeof(char *));
+ kvals = (Datum *) palloc(nkeys * sizeof(Datum));
/*
* Construct ident string as TriggerName $ TriggeredRelationId and try
@@ -228,7 +228,7 @@ check_foreign_key()
int nrefs; /* number of references (== # of plans) */
char action; /* 'R'estrict | 'S'etnull | 'C'ascade */
int nkeys; /* # of key columns */
- char **kvals; /* key values */
+ Datum *kvals; /* key values */
char *relname; /* referencing relation name */
Relation rel; /* triggered relation */
HeapTuple trigtuple = NULL; /* tuple to being changed */
@@ -310,7 +310,7 @@ check_foreign_key()
* We use SPI plan preparation feature, so allocate space to place key
* values.
*/
- kvals = (char **) palloc(nkeys * sizeof(char *));
+ kvals = (Datum *) palloc(nkeys * sizeof(Datum));
/*
* Construct ident string as TriggerName $ TriggeredRelationId and try
@@ -494,7 +494,7 @@ check_foreign_key()
elog(WARN, "%s: tuple referenced in %s",
trigger->tgname, relname);
}
-#ifndef REFINT_QUIET
+#ifdef REFINT_VERBOSE
else
elog(NOTICE, "%s: %d tuple(s) of %s are %s",
trigger->tgname, SPI_processed, relname,
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index 6f4fd519f39..6eab4b8544f 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -73,7 +73,7 @@ extern int SPI_result;
extern int SPI_connect(void);
extern int SPI_finish(void);
extern int SPI_exec(char *src, int tcount);
-extern int SPI_execp(void *plan, char **values, char *Nulls, int tcount);
+extern int SPI_execp(void *plan, Datum *values, char *Nulls, int tcount);
extern void *SPI_prepare(char *src, int nargs, Oid * argtypes);
extern void *SPI_saveplan(void *plan);