diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-21 18:39:26 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-21 18:39:26 +0000 |
commit | eb3adab5685ce5a60bcf96628244f1e2a8e0ab3b (patch) | |
tree | 55ba25cb13ec6a414c7faf86a6d8da8357cfbfe7 /doc/src | |
parent | bc499687641a021e0dac3e146611b5a553cf0c5b (diff) | |
download | postgresql-eb3adab5685ce5a60bcf96628244f1e2a8e0ab3b.tar.gz postgresql-eb3adab5685ce5a60bcf96628244f1e2a8e0ab3b.zip |
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 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_language.sgml | 12 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_trigger.sgml | 9 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_type.sgml | 8 |
3 files changed, 21 insertions, 8 deletions
diff --git a/doc/src/sgml/ref/create_language.sgml b/doc/src/sgml/ref/create_language.sgml index 5cdf5dc9345..1d6e61f0736 100644 --- a/doc/src/sgml/ref/create_language.sgml +++ b/doc/src/sgml/ref/create_language.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.27 2002/08/22 00:01:40 tgl Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.28 2002/09/21 18:39:25 tgl Exp $ PostgreSQL documentation --> @@ -201,6 +201,16 @@ ERROR: PL handler function <replaceable class="parameter">funcname</replaceable </para> <para> + In <productname>PostgreSQL</productname> versions before 7.3, it was + necessary to declare handler functions as returning the placeholder + type <type>opaque</>, rather than <type>language_handler</>. + To support loading + of old dump files, <command>CREATE LANGUAGE</> will accept a function + declared as returning <type>opaque</>, but it will issue a NOTICE and + change the function's declared return type to <type>language_handler</>. + </para> + + <para> Use the <xref linkend="sql-createfunction" endterm="sql-createfunction-title"> command to create a new function. </para> diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml index c736dd95df9..1134cd800e2 100644 --- a/doc/src/sgml/ref/create_trigger.sgml +++ b/doc/src/sgml/ref/create_trigger.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.27 2002/08/22 00:01:40 tgl Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_trigger.sgml,v 1.28 2002/09/21 18:39:25 tgl Exp $ PostgreSQL documentation --> @@ -170,9 +170,10 @@ CREATE TRIGGER <para> In <productname>PostgreSQL</productname> versions before 7.3, it was necessary to declare trigger functions as returning the placeholder - type <type>opaque</>, rather than <type>trigger</>. This is still - supported, but is deprecated because it is obscure and causes loss of - type safety. + type <type>opaque</>, rather than <type>trigger</>. To support loading + of old dump files, <command>CREATE TRIGGER</> will accept a function + declared as returning <type>opaque</>, but it will issue a NOTICE and + change the function's declared return type to <type>trigger</>. </para> <para> diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml index 26c134303fa..9243bda86fa 100644 --- a/doc/src/sgml/ref/create_type.sgml +++ b/doc/src/sgml/ref/create_type.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.35 2002/09/21 18:32:54 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.36 2002/09/21 18:39:25 tgl Exp $ PostgreSQL documentation --> @@ -262,8 +262,10 @@ CREATE TYPE forward references to the type name with the placeholder pseudo-type <type>OPAQUE</>. The <type>cstring</> inputs and results also had to be declared as <type>OPAQUE</> before 7.3. - Use of <type>OPAQUE</> for this purpose is still supported, but it is - deprecated because it causes loss of type safety. + To support loading + of old dump files, <command>CREATE TYPE</> will accept functions + declared using <type>opaque</>, but it will issue a NOTICE and + change the function's declaration to use the correct types. </para> </note> |