summaryrefslogtreecommitdiff
path: root/src/pl
diff options
context:
space:
mode:
authorTom Lane2002-09-21 18:39:26 +0000
committerTom Lane2002-09-21 18:39:26 +0000
commiteb3adab5685ce5a60bcf96628244f1e2a8e0ab3b (patch)
tree55ba25cb13ec6a414c7faf86a6d8da8357cfbfe7 /src/pl
parentbc499687641a021e0dac3e146611b5a553cf0c5b (diff)
Provide an upgrade strategy for dump files containing functions declared
with OPAQUE. CREATE LANGUAGE, CREATE TRIGGER, and CREATE TYPE will all accept references to functions declared with OPAQUE --- but they will issue a NOTICE, and will modify the function entries in pg_proc to have the preferred type-safe argument or result types instead of OPAQUE. Per recent pghackers discussions.
Diffstat (limited to 'src/pl')
-rw-r--r--src/pl/plperl/plperl.c5
-rw-r--r--src/pl/plpgsql/src/pl_comp.c5
-rw-r--r--src/pl/tcl/pltcl.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 2fe9f688ac7..299e389405f 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -33,7 +33,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.34 2002/09/04 22:49:37 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.35 2002/09/21 18:39:26 tgl Exp $
*
**********************************************************************/
@@ -624,8 +624,7 @@ compile_plperl_function(Oid fn_oid, bool is_trigger)
{
if (procStruct->prorettype == VOIDOID)
/* okay */ ;
- else if (procStruct->prorettype == TRIGGEROID ||
- procStruct->prorettype == OPAQUEOID)
+ else if (procStruct->prorettype == TRIGGEROID)
{
free(prodesc->proname);
free(prodesc);
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index 00f2997ae3e..56c5ca3e70b 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.52 2002/09/12 00:24:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.53 2002/09/21 18:39:26 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -217,8 +217,7 @@ plpgsql_compile(Oid fn_oid, int functype)
if (procStruct->prorettype == VOIDOID ||
procStruct->prorettype == RECORDOID)
/* okay */ ;
- else if (procStruct->prorettype == TRIGGEROID ||
- procStruct->prorettype == OPAQUEOID)
+ else if (procStruct->prorettype == TRIGGEROID)
elog(ERROR, "plpgsql functions cannot return type %s"
"\n\texcept when used as triggers",
format_type_be(procStruct->prorettype));
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 44ee940e785..d498a9b6374 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.61 2002/09/04 20:31:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.62 2002/09/21 18:39:26 tgl Exp $
*
**********************************************************************/
@@ -1061,8 +1061,7 @@ compile_pltcl_function(Oid fn_oid, bool is_trigger)
{
if (procStruct->prorettype == VOIDOID)
/* okay */ ;
- else if (procStruct->prorettype == TRIGGEROID ||
- procStruct->prorettype == OPAQUEOID)
+ else if (procStruct->prorettype == TRIGGEROID)
{
free(prodesc->proname);
free(prodesc);