Commit 739adf32 authored by Peter Eisentraut's avatar Peter Eisentraut

Remove unused system table columns:

pg_language.lancompiler
pg_operator.oprprec
pg_operator.oprisleft
pg_proc.proimplicit
pg_proc.probyte_pct
pg_proc.properbyte_cpu
pg_proc.propercall_cpu
pg_proc.prooutin_ratio
pg_shadow.usetrace
pg_type.typprtlen
pg_type.typreceive
pg_type.typsend

Attempts to use the obsoleted attributes of pg_operator or pg_proc
in the CREATE commands will be greeted by a warning.  For pg_type,
there is no warning (yet) because pg_dump scripts still contain these
attributes.

Also remove new but already obsolete spellings
isVolatile, isStable, isImmutable in WITH clause.  (Use new syntax
instead.)
parent a7877755
<!-- <!--
Documentation of the system catalogs, directed toward PostgreSQL developers Documentation of the system catalogs, directed toward PostgreSQL developers
$Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.47 2002/07/24 05:51:55 ishii Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.48 2002/07/24 19:11:06 petere Exp $
--> -->
<chapter id="catalogs"> <chapter id="catalogs">
...@@ -1734,13 +1734,6 @@ ...@@ -1734,13 +1734,6 @@
</entry> </entry>
</row> </row>
<row>
<entry>lancompiler</entry>
<entry><type>text</type></entry>
<entry></entry>
<entry>not currently used</entry>
</row>
<row> <row>
<entry>lanacl</entry> <entry>lanacl</entry>
<entry><type>aclitem[]</type></entry> <entry><type>aclitem[]</type></entry>
...@@ -1976,14 +1969,6 @@ ...@@ -1976,14 +1969,6 @@
<entry>Owner (creator) of the operator</entry> <entry>Owner (creator) of the operator</entry>
</row> </row>
<row>
<entry>oprprec</entry>
<entry><type>int2</type></entry>
<entry></entry>
<entry>precedence (currently unused, as precedences are hard-wired
in the grammar)</entry>
</row>
<row> <row>
<entry>oprkind</entry> <entry>oprkind</entry>
<entry><type>char</type></entry> <entry><type>char</type></entry>
...@@ -1994,14 +1979,6 @@ ...@@ -1994,14 +1979,6 @@
</entry> </entry>
</row> </row>
<row>
<entry>oprisleft</entry>
<entry><type>bool</type></entry>
<entry></entry>
<entry>left-associativity (currently unused, as this is hard-wired
in the grammar)</entry>
</row>
<row> <row>
<entry>oprcanhash</entry> <entry>oprcanhash</entry>
<entry><type>bool</type></entry> <entry><type>bool</type></entry>
...@@ -2185,13 +2162,6 @@ ...@@ -2185,13 +2162,6 @@
<entry>not functional</entry> <entry>not functional</entry>
</row> </row>
<row>
<entry>proimplicit</entry>
<entry><type>bool</type></entry>
<entry></entry>
<entry>Function may be invoked as an implicit type coercion</entry>
</row>
<row> <row>
<entry>proisstrict</entry> <entry>proisstrict</entry>
<entry><type>bool</type></entry> <entry><type>bool</type></entry>
...@@ -2252,34 +2222,6 @@ ...@@ -2252,34 +2222,6 @@
<entry>A vector with the data types of the function arguments</entry> <entry>A vector with the data types of the function arguments</entry>
</row> </row>
<row>
<entry>probyte_pct</entry>
<entry><type>int4</type></entry>
<entry></entry>
<entry>dead code</entry>
</row>
<row>
<entry>properbyte_cpu</entry>
<entry><type>int4</type></entry>
<entry></entry>
<entry>dead code</entry>
</row>
<row>
<entry>propercall_cpu</entry>
<entry><type>int4</type></entry>
<entry></entry>
<entry>dead code</entry>
</row>
<row>
<entry>prooutin_ratio</entry>
<entry><type>int4</type></entry>
<entry></entry>
<entry>dead code</entry>
</row>
<row> <row>
<entry>prosrc</entry> <entry>prosrc</entry>
<entry><type>text</type></entry> <entry><type>text</type></entry>
...@@ -2471,13 +2413,6 @@ ...@@ -2471,13 +2413,6 @@
<entry>User may create databases</entry> <entry>User may create databases</entry>
</row> </row>
<row>
<entry>usetrace</entry>
<entry><type>bool</type></entry>
<entry></entry>
<entry>not used</entry>
</row>
<row> <row>
<entry>usesuper</entry> <entry>usesuper</entry>
<entry><type>bool</type></entry> <entry><type>bool</type></entry>
...@@ -2843,13 +2778,6 @@ ...@@ -2843,13 +2778,6 @@
<entry>Length of the storage representation of the type, -1 if variable length</entry> <entry>Length of the storage representation of the type, -1 if variable length</entry>
</row> </row>
<row>
<entry>typprtlen</entry>
<entry><type>int2</type></entry>
<entry></entry>
<entry>unused</entry>
</row>
<row> <row>
<entry>typbyval</entry> <entry>typbyval</entry>
<entry><type>bool</type></entry> <entry><type>bool</type></entry>
...@@ -2952,20 +2880,6 @@ ...@@ -2952,20 +2880,6 @@
<entry>Output function</entry> <entry>Output function</entry>
</row> </row>
<row>
<entry>typreceive</entry>
<entry><type>regproc</type></entry>
<entry>pg_proc.oid</entry>
<entry>unused</entry>
</row>
<row>
<entry>typsend</entry>
<entry><type>regproc</type></entry>
<entry>pg_proc.oid</entry>
<entry>unused</entry>
</row>
<row> <row>
<entry>typalign</entry> <entry>typalign</entry>
<entry><type>char</type></entry> <entry><type>char</type></entry>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.40 2002/07/18 23:11:27 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.41 2002/07/24 19:11:07 petere Exp $
--> -->
<refentry id="SQL-CREATEFUNCTION"> <refentry id="SQL-CREATEFUNCTION">
...@@ -257,16 +257,11 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable> ...@@ -257,16 +257,11 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>isImmutable</term>
<term>isCachable</term> <term>isCachable</term>
<term>isStable</term>
<term>isVolatile</term>
<listitem> <listitem>
<para> <para>
Equivalent to <literal>IMMUTABLE</literal>,
<literal>STABLE</literal>, <literal>VOLATILE</literal>.
<literal>isCachable</literal> is an obsolete equivalent of <literal>isCachable</literal> is an obsolete equivalent of
<literal>isImmutable</literal>; it's still accepted for <literal>IMMUTABLE</literal>; it's still accepted for
backwards-compatibility reasons. backwards-compatibility reasons.
</para> </para>
</listitem> </listitem>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.25 2002/06/20 15:44:06 momjian Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.26 2002/07/24 19:11:07 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -221,14 +221,13 @@ ERROR: PL handler function <replaceable class="parameter">funcname</replaceable ...@@ -221,14 +221,13 @@ ERROR: PL handler function <replaceable class="parameter">funcname</replaceable
lanpltrusted | boolean | lanpltrusted | boolean |
lanplcallfoid | oid | lanplcallfoid | oid |
lanvalidator | oid | lanvalidator | oid |
lancompiler | text |
lanacl | aclitem[] | lanacl | aclitem[] |
lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator | lancompiler | lanacl lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator | lanacl
-------------+---------+--------------+---------------+--------------+-------------+-------- -------------+---------+--------------+---------------+--------------+--------
internal | f | f | 0 | 2246 | n/a | internal | f | f | 0 | 2246 |
c | f | f | 0 | 2247 | /bin/cc | c | f | f | 0 | 2247 |
sql | f | t | 0 | 2248 | postgres | {=U} sql | f | t | 0 | 2248 | {=U}
</screen> </screen>
</para> </para>
......
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.29 2002/05/18 15:44:47 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.30 2002/07/24 19:11:07 petere Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -24,10 +24,8 @@ PostgreSQL documentation ...@@ -24,10 +24,8 @@ PostgreSQL documentation
CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <replaceable class="parameter">input_function</replaceable>, OUTPUT = <replaceable class="parameter">output_function</replaceable> CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <replaceable class="parameter">input_function</replaceable>, OUTPUT = <replaceable class="parameter">output_function</replaceable>
, INTERNALLENGTH = { <replaceable , INTERNALLENGTH = { <replaceable
class="parameter">internallength</replaceable> | VARIABLE } class="parameter">internallength</replaceable> | VARIABLE }
[ , EXTERNALLENGTH = { <replaceable class="parameter">externallength</replaceable> | VARIABLE } ]
[ , DEFAULT = <replaceable class="parameter">default</replaceable> ] [ , DEFAULT = <replaceable class="parameter">default</replaceable> ]
[ , ELEMENT = <replaceable class="parameter">element</replaceable> ] [ , DELIMITER = <replaceable class="parameter">delimiter</replaceable> ] [ , ELEMENT = <replaceable class="parameter">element</replaceable> ] [ , DELIMITER = <replaceable class="parameter">delimiter</replaceable> ]
[ , SEND = <replaceable class="parameter">send_function</replaceable> ] [ , RECEIVE = <replaceable class="parameter">receive_function</replaceable> ]
[ , PASSEDBYVALUE ] [ , PASSEDBYVALUE ]
[ , ALIGNMENT = <replaceable class="parameter">alignment</replaceable> ] [ , ALIGNMENT = <replaceable class="parameter">alignment</replaceable> ]
[ , STORAGE = <replaceable class="parameter">storage</replaceable> ] [ , STORAGE = <replaceable class="parameter">storage</replaceable> ]
...@@ -63,16 +61,6 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep ...@@ -63,16 +61,6 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><replaceable class="parameter">externallength</replaceable></term>
<listitem>
<para>
A literal value, which specifies the external (displayed) length of
the new type.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">input_function</replaceable></term> <term><replaceable class="parameter">input_function</replaceable></term>
<listitem> <listitem>
...@@ -126,26 +114,6 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep ...@@ -126,26 +114,6 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><replaceable class="parameter">send_function</replaceable></term>
<listitem>
<para>
The name of a function, created by <command>CREATE FUNCTION</command>, which
converts data of this type into a form suitable for
transmission to another machine.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">receive_function</replaceable></term>
<listitem>
<para>
The name of a function, created by <command>CREATE FUNCTION</command>, which
converts data of this type from a form suitable for
transmission from another machine to internal form.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><replaceable class="parameter">alignment</replaceable></term> <term><replaceable class="parameter">alignment</replaceable></term>
...@@ -259,13 +227,6 @@ CREATE TYPE ...@@ -259,13 +227,6 @@ CREATE TYPE
length of this value of the type. length of this value of the type.
</para> </para>
<para>
The external representation length is similarly specified using the
<replaceable class="parameter">externallength</replaceable>
keyword. (This value is not presently used, and is typically omitted,
letting it default to <option>VARIABLE</option>.)
</para>
<para> <para>
To indicate that a type is an array, To indicate that a type is an array,
specify the type of the array specify the type of the array
...@@ -292,18 +253,6 @@ CREATE TYPE ...@@ -292,18 +253,6 @@ CREATE TYPE
clause attached to a particular column.) clause attached to a particular column.)
</para> </para>
<para>
The optional arguments
<replaceable class="parameter">send_function</replaceable> and
<replaceable class="parameter">receive_function</replaceable>
are not currently used, and are usually omitted (allowing them
to default to the
<replaceable class="parameter">output_function</replaceable> and
<replaceable class="parameter">input_function</replaceable>
respectively). These functions may someday be resurrected for use
in specifying machine-independent binary representations.
</para>
<para> <para>
The optional flag, <option>PASSEDBYVALUE</option>, indicates that The optional flag, <option>PASSEDBYVALUE</option>, indicates that
values of this data type are passed values of this data type are passed
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.212 2002/07/20 05:16:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.213 2002/07/24 19:11:07 petere Exp $
* *
* *
* INTERFACE ROUTINES * INTERFACE ROUTINES
...@@ -641,13 +641,10 @@ AddNewRelationType(const char *typeName, ...@@ -641,13 +641,10 @@ AddNewRelationType(const char *typeName,
new_type_oid, /* preassigned oid for type */ new_type_oid, /* preassigned oid for type */
new_rel_oid, /* relation oid */ new_rel_oid, /* relation oid */
sizeof(Oid), /* internal size */ sizeof(Oid), /* internal size */
-1, /* external size */
'c', /* type-type (complex) */ 'c', /* type-type (complex) */
',', /* default array delimiter */ ',', /* default array delimiter */
F_OIDIN, /* input procedure */ F_OIDIN, /* input procedure */
F_OIDOUT, /* output procedure */ F_OIDOUT, /* output procedure */
F_OIDIN, /* receive procedure */
F_OIDOUT, /* send procedure */
InvalidOid, /* array element type - irrelevant */ InvalidOid, /* array element type - irrelevant */
InvalidOid, /* domain base type - irrelevant */ InvalidOid, /* domain base type - irrelevant */
NULL, /* default type value - none */ NULL, /* default type value - none */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.51 2002/07/18 23:11:27 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.52 2002/07/24 19:11:07 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -146,10 +146,6 @@ AggregateCreate(const char *aggName, ...@@ -146,10 +146,6 @@ AggregateCreate(const char *aggName,
false, /* security invoker (currently not definable for agg) */ false, /* security invoker (currently not definable for agg) */
false, /* isStrict (not needed for agg) */ false, /* isStrict (not needed for agg) */
PROVOLATILE_IMMUTABLE, /* volatility (not needed for agg) */ PROVOLATILE_IMMUTABLE, /* volatility (not needed for agg) */
BYTE_PCT, /* default cost values */
PERBYTE_CPU,
PERCALL_CPU,
OUTIN_RATIO,
1, /* parameterCount */ 1, /* parameterCount */
fnArgs); /* parameterTypes */ fnArgs); /* parameterTypes */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.73 2002/07/20 05:16:56 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.74 2002/07/24 19:11:08 petere Exp $
* *
* NOTES * NOTES
* these routines moved here from commands/define.c and somewhat cleaned up. * these routines moved here from commands/define.c and somewhat cleaned up.
...@@ -232,9 +232,7 @@ OperatorShellMake(const char *operatorName, ...@@ -232,9 +232,7 @@ OperatorShellMake(const char *operatorName,
values[i++] = NameGetDatum(&oname); /* oprname */ values[i++] = NameGetDatum(&oname); /* oprname */
values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */ values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */
values[i++] = Int32GetDatum(GetUserId()); /* oprowner */ values[i++] = Int32GetDatum(GetUserId()); /* oprowner */
values[i++] = UInt16GetDatum(0); /* oprprec */
values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */ values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */
values[i++] = BoolGetDatum(false); /* oprisleft */
values[i++] = BoolGetDatum(false); /* oprcanhash */ values[i++] = BoolGetDatum(false); /* oprcanhash */
values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */ values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */
values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */ values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */
...@@ -296,8 +294,6 @@ OperatorShellMake(const char *operatorName, ...@@ -296,8 +294,6 @@ OperatorShellMake(const char *operatorName,
* leftTypeId X left type ID * leftTypeId X left type ID
* rightTypeId X right type ID * rightTypeId X right type ID
* procedureName procedure for operator * procedureName procedure for operator
* precedence operator precedence
* isLeftAssociative operator is left associative
* commutatorName X commutator operator * commutatorName X commutator operator
* negatorName X negator operator * negatorName X negator operator
* restrictionName X restriction sel. procedure * restrictionName X restriction sel. procedure
...@@ -331,9 +327,7 @@ OperatorShellMake(const char *operatorName, ...@@ -331,9 +327,7 @@ OperatorShellMake(const char *operatorName,
* assign values to the fields of the operator: * assign values to the fields of the operator:
* operatorName * operatorName
* owner id (simply the user id of the caller) * owner id (simply the user id of the caller)
* precedence
* operator "kind" either "b" for binary or "l" for left unary * operator "kind" either "b" for binary or "l" for left unary
* isLeftAssociative boolean
* canHash boolean * canHash boolean
* leftTypeObjectId -- type must already be defined * leftTypeObjectId -- type must already be defined
* rightTypeObjectId -- this is optional, enter ObjectId=0 if none specified * rightTypeObjectId -- this is optional, enter ObjectId=0 if none specified
...@@ -373,8 +367,6 @@ OperatorCreate(const char *operatorName, ...@@ -373,8 +367,6 @@ OperatorCreate(const char *operatorName,
Oid leftTypeId, Oid leftTypeId,
Oid rightTypeId, Oid rightTypeId,
List *procedureName, List *procedureName,
uint16 precedence,
bool isLeftAssociative,
List *commutatorName, List *commutatorName,
List *negatorName, List *negatorName,
List *restrictionName, List *restrictionName,
...@@ -524,9 +516,7 @@ OperatorCreate(const char *operatorName, ...@@ -524,9 +516,7 @@ OperatorCreate(const char *operatorName,
values[i++] = NameGetDatum(&oname); /* oprname */ values[i++] = NameGetDatum(&oname); /* oprname */
values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */ values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */
values[i++] = Int32GetDatum(GetUserId()); /* oprowner */ values[i++] = Int32GetDatum(GetUserId()); /* oprowner */
values[i++] = UInt16GetDatum(precedence); /* oprprec */
values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */ values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */
values[i++] = BoolGetDatum(isLeftAssociative); /* oprisleft */
values[i++] = BoolGetDatum(canHash); /* oprcanhash */ values[i++] = BoolGetDatum(canHash); /* oprcanhash */
values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */ values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */
values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */ values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.80 2002/07/20 05:16:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.81 2002/07/24 19:11:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -57,10 +57,6 @@ ProcedureCreate(const char *procedureName, ...@@ -57,10 +57,6 @@ ProcedureCreate(const char *procedureName,
bool security_definer, bool security_definer,
bool isStrict, bool isStrict,
char volatility, char volatility,
int32 byte_pct,
int32 perbyte_cpu,
int32 percall_cpu,
int32 outin_ratio,
int parameterCount, int parameterCount,
const Oid *parameterTypes) const Oid *parameterTypes)
{ {
...@@ -162,17 +158,12 @@ ProcedureCreate(const char *procedureName, ...@@ -162,17 +158,12 @@ ProcedureCreate(const char *procedureName,
values[i++] = ObjectIdGetDatum(languageObjectId); /* prolang */ values[i++] = ObjectIdGetDatum(languageObjectId); /* prolang */
values[i++] = BoolGetDatum(isAgg); /* proisagg */ values[i++] = BoolGetDatum(isAgg); /* proisagg */
values[i++] = BoolGetDatum(security_definer); /* prosecdef */ values[i++] = BoolGetDatum(security_definer); /* prosecdef */
values[i++] = BoolGetDatum(false); /* proimplicit */
values[i++] = BoolGetDatum(isStrict); /* proisstrict */ values[i++] = BoolGetDatum(isStrict); /* proisstrict */
values[i++] = BoolGetDatum(returnsSet); /* proretset */ values[i++] = BoolGetDatum(returnsSet); /* proretset */
values[i++] = CharGetDatum(volatility); /* provolatile */ values[i++] = CharGetDatum(volatility); /* provolatile */
values[i++] = UInt16GetDatum(parameterCount); /* pronargs */ values[i++] = UInt16GetDatum(parameterCount); /* pronargs */
values[i++] = ObjectIdGetDatum(returnType); /* prorettype */ values[i++] = ObjectIdGetDatum(returnType); /* prorettype */
values[i++] = PointerGetDatum(typev); /* proargtypes */ values[i++] = PointerGetDatum(typev); /* proargtypes */
values[i++] = Int32GetDatum(byte_pct); /* probyte_pct */
values[i++] = Int32GetDatum(perbyte_cpu); /* properbyte_cpu */
values[i++] = Int32GetDatum(percall_cpu); /* propercall_cpu */
values[i++] = Int32GetDatum(outin_ratio); /* prooutin_ratio */
values[i++] = DirectFunctionCall1(textin, /* prosrc */ values[i++] = DirectFunctionCall1(textin, /* prosrc */
CStringGetDatum(prosrc)); CStringGetDatum(prosrc));
values[i++] = DirectFunctionCall1(textin, /* probin */ values[i++] = DirectFunctionCall1(textin, /* probin */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.75 2002/07/20 05:16:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.76 2002/07/24 19:11:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -76,7 +76,6 @@ TypeShellMake(const char *typeName, Oid typeNamespace) ...@@ -76,7 +76,6 @@ TypeShellMake(const char *typeName, Oid typeNamespace)
values[i++] = ObjectIdGetDatum(typeNamespace); /* typnamespace */ values[i++] = ObjectIdGetDatum(typeNamespace); /* typnamespace */
values[i++] = ObjectIdGetDatum(InvalidOid); /* typowner */ values[i++] = ObjectIdGetDatum(InvalidOid); /* typowner */
values[i++] = Int16GetDatum(0); /* typlen */ values[i++] = Int16GetDatum(0); /* typlen */
values[i++] = Int16GetDatum(0); /* typprtlen */
values[i++] = BoolGetDatum(false); /* typbyval */ values[i++] = BoolGetDatum(false); /* typbyval */
values[i++] = CharGetDatum(0); /* typtype */ values[i++] = CharGetDatum(0); /* typtype */
values[i++] = BoolGetDatum(false); /* typisdefined */ values[i++] = BoolGetDatum(false); /* typisdefined */
...@@ -85,8 +84,6 @@ TypeShellMake(const char *typeName, Oid typeNamespace) ...@@ -85,8 +84,6 @@ TypeShellMake(const char *typeName, Oid typeNamespace)
values[i++] = ObjectIdGetDatum(InvalidOid); /* typelem */ values[i++] = ObjectIdGetDatum(InvalidOid); /* typelem */
values[i++] = ObjectIdGetDatum(InvalidOid); /* typinput */ values[i++] = ObjectIdGetDatum(InvalidOid); /* typinput */
values[i++] = ObjectIdGetDatum(InvalidOid); /* typoutput */ values[i++] = ObjectIdGetDatum(InvalidOid); /* typoutput */
values[i++] = ObjectIdGetDatum(InvalidOid); /* typreceive */
values[i++] = ObjectIdGetDatum(InvalidOid); /* typsend */
values[i++] = CharGetDatum('i'); /* typalign */ values[i++] = CharGetDatum('i'); /* typalign */
values[i++] = CharGetDatum('p'); /* typstorage */ values[i++] = CharGetDatum('p'); /* typstorage */
values[i++] = BoolGetDatum(false); /* typnotnull */ values[i++] = BoolGetDatum(false); /* typnotnull */
...@@ -141,13 +138,10 @@ TypeCreate(const char *typeName, ...@@ -141,13 +138,10 @@ TypeCreate(const char *typeName,
Oid assignedTypeOid, Oid assignedTypeOid,
Oid relationOid, /* only for 'c'atalog typeTypes */ Oid relationOid, /* only for 'c'atalog typeTypes */
int16 internalSize, int16 internalSize,
int16 externalSize,
char typeType, char typeType,
char typDelim, char typDelim,
Oid inputProcedure, Oid inputProcedure,
Oid outputProcedure, Oid outputProcedure,
Oid receiveProcedure,
Oid sendProcedure,
Oid elementType, Oid elementType,
Oid baseType, Oid baseType,
const char *defaultTypeValue, /* human readable rep */ const char *defaultTypeValue, /* human readable rep */
...@@ -176,9 +170,6 @@ TypeCreate(const char *typeName, ...@@ -176,9 +170,6 @@ TypeCreate(const char *typeName,
if (!(internalSize > 0 || internalSize == -1)) if (!(internalSize > 0 || internalSize == -1))
elog(ERROR, "TypeCreate: invalid type internal size %d", elog(ERROR, "TypeCreate: invalid type internal size %d",
internalSize); internalSize);
if (!(externalSize > 0 || externalSize == -1))
elog(ERROR, "TypeCreate: invalid type external size %d",
externalSize);
if (internalSize != -1 && storage != 'p') if (internalSize != -1 && storage != 'p')
elog(ERROR, "TypeCreate: fixed size types must have storage PLAIN"); elog(ERROR, "TypeCreate: fixed size types must have storage PLAIN");
...@@ -202,7 +193,6 @@ TypeCreate(const char *typeName, ...@@ -202,7 +193,6 @@ TypeCreate(const char *typeName,
values[i++] = ObjectIdGetDatum(typeNamespace); /* typnamespace */ values[i++] = ObjectIdGetDatum(typeNamespace); /* typnamespace */
values[i++] = Int32GetDatum(GetUserId()); /* typowner */ values[i++] = Int32GetDatum(GetUserId()); /* typowner */
values[i++] = Int16GetDatum(internalSize); /* typlen */ values[i++] = Int16GetDatum(internalSize); /* typlen */
values[i++] = Int16GetDatum(externalSize); /* typprtlen */
values[i++] = BoolGetDatum(passedByValue); /* typbyval */ values[i++] = BoolGetDatum(passedByValue); /* typbyval */
values[i++] = CharGetDatum(typeType); /* typtype */ values[i++] = CharGetDatum(typeType); /* typtype */
values[i++] = BoolGetDatum(true); /* typisdefined */ values[i++] = BoolGetDatum(true); /* typisdefined */
...@@ -211,8 +201,6 @@ TypeCreate(const char *typeName, ...@@ -211,8 +201,6 @@ TypeCreate(const char *typeName,
values[i++] = ObjectIdGetDatum(elementType); /* typelem */ values[i++] = ObjectIdGetDatum(elementType); /* typelem */
values[i++] = ObjectIdGetDatum(inputProcedure); /* typinput */ values[i++] = ObjectIdGetDatum(inputProcedure); /* typinput */
values[i++] = ObjectIdGetDatum(outputProcedure); /* typoutput */ values[i++] = ObjectIdGetDatum(outputProcedure); /* typoutput */
values[i++] = ObjectIdGetDatum(receiveProcedure); /* typreceive */
values[i++] = ObjectIdGetDatum(sendProcedure); /* typsend */
values[i++] = CharGetDatum(alignment); /* typalign */ values[i++] = CharGetDatum(alignment); /* typalign */
values[i++] = CharGetDatum(storage); /* typstorage */ values[i++] = CharGetDatum(storage); /* typstorage */
values[i++] = BoolGetDatum(typeNotNull); /* typnotnull */ values[i++] = BoolGetDatum(typeNotNull); /* typnotnull */
...@@ -335,22 +323,6 @@ TypeCreate(const char *typeName, ...@@ -335,22 +323,6 @@ TypeCreate(const char *typeName,
referenced.objectSubId = 0; referenced.objectSubId = 0;
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL); recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
if (receiveProcedure != inputProcedure)
{
referenced.classId = RelOid_pg_proc;
referenced.objectId = receiveProcedure;
referenced.objectSubId = 0;
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
}
if (sendProcedure != outputProcedure)
{
referenced.classId = RelOid_pg_proc;
referenced.objectId = sendProcedure;
referenced.objectSubId = 0;
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
}
/* /*
* If the type is a rowtype for a relation, mark it as internally * If the type is a rowtype for a relation, mark it as internally
* dependent on the relation. This allows it to be auto-dropped * dependent on the relation. This allows it to be auto-dropped
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.12 2002/07/22 20:23:19 petere Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.13 2002/07/24 19:11:09 petere Exp $
* *
* DESCRIPTION * DESCRIPTION
* These routines take the parse tree and pick out the * These routines take the parse tree and pick out the
...@@ -272,11 +272,7 @@ compute_attributes_sql_style(const List *options, ...@@ -272,11 +272,7 @@ compute_attributes_sql_style(const List *options,
*------------ *------------
*/ */
static void static void
compute_attributes_with_style(List *parameters, compute_attributes_with_style(List *parameters, bool *isStrict_p, char *volatility_p)
int32 *byte_pct_p, int32 *perbyte_cpu_p,
int32 *percall_cpu_p, int32 *outin_ratio_p,
bool *isStrict_p,
char *volatility_p)
{ {
List *pl; List *pl;
...@@ -286,33 +282,11 @@ compute_attributes_with_style(List *parameters, ...@@ -286,33 +282,11 @@ compute_attributes_with_style(List *parameters,
if (strcasecmp(param->defname, "isstrict") == 0) if (strcasecmp(param->defname, "isstrict") == 0)
*isStrict_p = true; *isStrict_p = true;
else if (strcasecmp(param->defname, "isimmutable") == 0)
*volatility_p = PROVOLATILE_IMMUTABLE;
else if (strcasecmp(param->defname, "isstable") == 0)
*volatility_p = PROVOLATILE_STABLE;
else if (strcasecmp(param->defname, "isvolatile") == 0)
*volatility_p = PROVOLATILE_VOLATILE;
else if (strcasecmp(param->defname, "iscachable") == 0) else if (strcasecmp(param->defname, "iscachable") == 0)
{ {
/* obsolete spelling of isImmutable */ /* obsolete spelling of isImmutable */
*volatility_p = PROVOLATILE_IMMUTABLE; *volatility_p = PROVOLATILE_IMMUTABLE;
} }
else if (strcasecmp(param->defname, "trusted") == 0)
{
/*
* we don't have untrusted functions any more. The 4.2
* implementation is lousy anyway so I took it out. -ay 10/94
*/
elog(ERROR, "untrusted function has been decommissioned.");
}
else if (strcasecmp(param->defname, "byte_pct") == 0)
*byte_pct_p = (int) defGetNumeric(param);
else if (strcasecmp(param->defname, "perbyte_cpu") == 0)
*perbyte_cpu_p = (int) defGetNumeric(param);
else if (strcasecmp(param->defname, "percall_cpu") == 0)
*percall_cpu_p = (int) defGetNumeric(param);
else if (strcasecmp(param->defname, "outin_ratio") == 0)
*outin_ratio_p = (int) defGetNumeric(param);
else else
elog(WARNING, "Unrecognized function attribute '%s' ignored", elog(WARNING, "Unrecognized function attribute '%s' ignored",
param->defname); param->defname);
...@@ -383,10 +357,6 @@ CreateFunction(CreateFunctionStmt *stmt) ...@@ -383,10 +357,6 @@ CreateFunction(CreateFunctionStmt *stmt)
AclResult aclresult; AclResult aclresult;
int parameterCount; int parameterCount;
Oid parameterTypes[FUNC_MAX_ARGS]; Oid parameterTypes[FUNC_MAX_ARGS];
int32 byte_pct,
perbyte_cpu,
percall_cpu,
outin_ratio;
bool isStrict, bool isStrict,
security; security;
char volatility; char volatility;
...@@ -404,10 +374,6 @@ CreateFunction(CreateFunctionStmt *stmt) ...@@ -404,10 +374,6 @@ CreateFunction(CreateFunctionStmt *stmt)
aclcheck_error(aclresult, get_namespace_name(namespaceId)); aclcheck_error(aclresult, get_namespace_name(namespaceId));
/* defaults attributes */ /* defaults attributes */
byte_pct = BYTE_PCT;
perbyte_cpu = PERBYTE_CPU;
percall_cpu = PERCALL_CPU;
outin_ratio = OUTIN_RATIO;
isStrict = false; isStrict = false;
security = false; security = false;
volatility = PROVOLATILE_VOLATILE; volatility = PROVOLATILE_VOLATILE;
...@@ -459,9 +425,7 @@ CreateFunction(CreateFunctionStmt *stmt) ...@@ -459,9 +425,7 @@ CreateFunction(CreateFunctionStmt *stmt)
parameterCount = compute_parameter_types(stmt->argTypes, languageOid, parameterCount = compute_parameter_types(stmt->argTypes, languageOid,
parameterTypes); parameterTypes);
compute_attributes_with_style(stmt->withClause, compute_attributes_with_style(stmt->withClause, &isStrict, &volatility);
&byte_pct, &perbyte_cpu, &percall_cpu,
&outin_ratio, &isStrict, &volatility);
interpret_AS_clause(languageOid, languageName, as_clause, interpret_AS_clause(languageOid, languageName, as_clause,
&prosrc_str, &probin_str); &prosrc_str, &probin_str);
...@@ -505,10 +469,6 @@ CreateFunction(CreateFunctionStmt *stmt) ...@@ -505,10 +469,6 @@ CreateFunction(CreateFunctionStmt *stmt)
security, security,
isStrict, isStrict,
volatility, volatility,
byte_pct,
perbyte_cpu,
percall_cpu,
outin_ratio,
parameterCount, parameterCount,
parameterTypes); parameterTypes);
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/operatorcmds.c,v 1.5 2002/07/12 18:43:16 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/operatorcmds.c,v 1.6 2002/07/24 19:11:09 petere Exp $
* *
* DESCRIPTION * DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the * The "DefineFoo" routines take the parse tree and pick out the
...@@ -62,11 +62,8 @@ DefineOperator(List *names, List *parameters) ...@@ -62,11 +62,8 @@ DefineOperator(List *names, List *parameters)
char *oprName; char *oprName;
Oid oprNamespace; Oid oprNamespace;
AclResult aclresult; AclResult aclresult;
uint16 precedence = 0; /* operator precedence */
bool canHash = false; /* operator hashes */ bool canHash = false; /* operator hashes */
bool canMerge = false; /* operator merges */ bool canMerge = false; /* operator merges */
bool isLeftAssociative = true; /* operator is left
* associative */
List *functionName = NIL; /* function for operator */ List *functionName = NIL; /* function for operator */
TypeName *typeName1 = NULL; /* first type name */ TypeName *typeName1 = NULL; /* first type name */
TypeName *typeName2 = NULL; /* second type name */ TypeName *typeName2 = NULL; /* second type name */
...@@ -113,16 +110,6 @@ DefineOperator(List *names, List *parameters) ...@@ -113,16 +110,6 @@ DefineOperator(List *names, List *parameters)
} }
else if (strcasecmp(defel->defname, "procedure") == 0) else if (strcasecmp(defel->defname, "procedure") == 0)
functionName = defGetQualifiedName(defel); functionName = defGetQualifiedName(defel);
else if (strcasecmp(defel->defname, "precedence") == 0)
{
/* NOT IMPLEMENTED (never worked in v4.2) */
elog(NOTICE, "CREATE OPERATOR: precedence not implemented");
}
else if (strcasecmp(defel->defname, "associativity") == 0)
{
/* NOT IMPLEMENTED (never worked in v4.2) */
elog(NOTICE, "CREATE OPERATOR: associativity not implemented");
}
else if (strcasecmp(defel->defname, "commutator") == 0) else if (strcasecmp(defel->defname, "commutator") == 0)
commutatorName = defGetQualifiedName(defel); commutatorName = defGetQualifiedName(defel);
else if (strcasecmp(defel->defname, "negator") == 0) else if (strcasecmp(defel->defname, "negator") == 0)
...@@ -190,8 +177,6 @@ DefineOperator(List *names, List *parameters) ...@@ -190,8 +177,6 @@ DefineOperator(List *names, List *parameters)
typeId1, /* left type id */ typeId1, /* left type id */
typeId2, /* right type id */ typeId2, /* right type id */
functionName, /* function for operator */ functionName, /* function for operator */
precedence, /* operator precedence */
isLeftAssociative, /* operator is left associative */
commutatorName, /* optional commutator operator commutatorName, /* optional commutator operator
* name */ * name */
negatorName, /* optional negator operator name */ negatorName, /* optional negator operator name */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.37 2002/07/20 05:16:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.38 2002/07/24 19:11:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -110,8 +110,6 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) ...@@ -110,8 +110,6 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
values[i++] = BoolGetDatum(stmt->pltrusted); values[i++] = BoolGetDatum(stmt->pltrusted);
values[i++] = ObjectIdGetDatum(procOid); values[i++] = ObjectIdGetDatum(procOid);
values[i++] = ObjectIdGetDatum(valProcOid); values[i++] = ObjectIdGetDatum(valProcOid);
values[i++] = DirectFunctionCall1(textin,
CStringGetDatum(stmt->plcompiler));
nulls[i] = 'n'; /* lanacl */ nulls[i] = 'n'; /* lanacl */
rel = heap_openr(LanguageRelationName, RowExclusiveLock); rel = heap_openr(LanguageRelationName, RowExclusiveLock);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.7 2002/07/20 05:16:57 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.8 2002/07/24 19:11:09 petere Exp $
* *
* DESCRIPTION * DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the * The "DefineFoo" routines take the parse tree and pick out the
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* NOTES * NOTES
* These things must be defined and committed in the following order: * These things must be defined and committed in the following order:
* "create function": * "create function":
* input/output, recv/send procedures * input/output functions
* "create type": * "create type":
* type * type
* "create operator": * "create operator":
...@@ -62,12 +62,9 @@ DefineType(List *names, List *parameters) ...@@ -62,12 +62,9 @@ DefineType(List *names, List *parameters)
Oid typeNamespace; Oid typeNamespace;
AclResult aclresult; AclResult aclresult;
int16 internalLength = -1; /* int2 */ int16 internalLength = -1; /* int2 */
int16 externalLength = -1; /* int2 */
Oid elemType = InvalidOid; Oid elemType = InvalidOid;
List *inputName = NIL; List *inputName = NIL;
List *outputName = NIL; List *outputName = NIL;
List *sendName = NIL;
List *receiveName = NIL;
char *defaultValue = NULL; char *defaultValue = NULL;
bool byValue = false; bool byValue = false;
char delimiter = DEFAULT_TYPDELIM; char delimiter = DEFAULT_TYPDELIM;
...@@ -75,8 +72,6 @@ DefineType(List *names, List *parameters) ...@@ -75,8 +72,6 @@ DefineType(List *names, List *parameters)
char storage = 'p'; /* default TOAST storage method */ char storage = 'p'; /* default TOAST storage method */
Oid inputOid; Oid inputOid;
Oid outputOid; Oid outputOid;
Oid sendOid;
Oid receiveOid;
char *shadow_type; char *shadow_type;
List *pl; List *pl;
Oid typoid; Oid typoid;
...@@ -105,15 +100,15 @@ DefineType(List *names, List *parameters) ...@@ -105,15 +100,15 @@ DefineType(List *names, List *parameters)
if (strcasecmp(defel->defname, "internallength") == 0) if (strcasecmp(defel->defname, "internallength") == 0)
internalLength = defGetTypeLength(defel); internalLength = defGetTypeLength(defel);
else if (strcasecmp(defel->defname, "externallength") == 0) else if (strcasecmp(defel->defname, "externallength") == 0)
externalLength = defGetTypeLength(defel); ; /* ignored -- remove after 7.3 */
else if (strcasecmp(defel->defname, "input") == 0) else if (strcasecmp(defel->defname, "input") == 0)
inputName = defGetQualifiedName(defel); inputName = defGetQualifiedName(defel);
else if (strcasecmp(defel->defname, "output") == 0) else if (strcasecmp(defel->defname, "output") == 0)
outputName = defGetQualifiedName(defel); outputName = defGetQualifiedName(defel);
else if (strcasecmp(defel->defname, "send") == 0) else if (strcasecmp(defel->defname, "send") == 0)
sendName = defGetQualifiedName(defel); ; /* ignored -- remove after 7.3 */
else if (strcasecmp(defel->defname, "receive") == 0) else if (strcasecmp(defel->defname, "receive") == 0)
receiveName = defGetQualifiedName(defel); ; /* ignored -- remove after 7.3 */
else if (strcasecmp(defel->defname, "delimiter") == 0) else if (strcasecmp(defel->defname, "delimiter") == 0)
{ {
char *p = defGetString(defel); char *p = defGetString(defel);
...@@ -187,14 +182,6 @@ DefineType(List *names, List *parameters) ...@@ -187,14 +182,6 @@ DefineType(List *names, List *parameters)
/* Convert I/O proc names to OIDs */ /* Convert I/O proc names to OIDs */
inputOid = findTypeIOFunction(inputName, false); inputOid = findTypeIOFunction(inputName, false);
outputOid = findTypeIOFunction(outputName, true); outputOid = findTypeIOFunction(outputName, true);
if (sendName)
sendOid = findTypeIOFunction(sendName, true);
else
sendOid = outputOid;
if (receiveName)
receiveOid = findTypeIOFunction(receiveName, false);
else
receiveOid = inputOid;
/* /*
* now have TypeCreate do all the real work. * now have TypeCreate do all the real work.
...@@ -205,13 +192,10 @@ DefineType(List *names, List *parameters) ...@@ -205,13 +192,10 @@ DefineType(List *names, List *parameters)
InvalidOid, /* preassigned type oid (not done here) */ InvalidOid, /* preassigned type oid (not done here) */
InvalidOid, /* relation oid (n/a here) */ InvalidOid, /* relation oid (n/a here) */
internalLength, /* internal size */ internalLength, /* internal size */
externalLength, /* external size */
'b', /* type-type (base type) */ 'b', /* type-type (base type) */
delimiter, /* array element delimiter */ delimiter, /* array element delimiter */
inputOid, /* input procedure */ inputOid, /* input procedure */
outputOid, /* output procedure */ outputOid, /* output procedure */
receiveOid, /* receive procedure */
sendOid, /* send procedure */
elemType, /* element type ID */ elemType, /* element type ID */
InvalidOid, /* base type ID (only for domains) */ InvalidOid, /* base type ID (only for domains) */
defaultValue, /* default type value */ defaultValue, /* default type value */
...@@ -237,13 +221,10 @@ DefineType(List *names, List *parameters) ...@@ -237,13 +221,10 @@ DefineType(List *names, List *parameters)
InvalidOid, /* preassigned type oid (not done here) */ InvalidOid, /* preassigned type oid (not done here) */
InvalidOid, /* relation oid (n/a here) */ InvalidOid, /* relation oid (n/a here) */
-1, /* internal size */ -1, /* internal size */
-1, /* external size */
'b', /* type-type (base type) */ 'b', /* type-type (base type) */
DEFAULT_TYPDELIM, /* array element delimiter */ DEFAULT_TYPDELIM, /* array element delimiter */
F_ARRAY_IN, /* input procedure */ F_ARRAY_IN, /* input procedure */
F_ARRAY_OUT, /* output procedure */ F_ARRAY_OUT, /* output procedure */
F_ARRAY_IN, /* receive procedure */
F_ARRAY_OUT, /* send procedure */
typoid, /* element type ID */ typoid, /* element type ID */
InvalidOid, /* base type ID */ InvalidOid, /* base type ID */
NULL, /* never a default type value */ NULL, /* never a default type value */
...@@ -346,11 +327,8 @@ DefineDomain(CreateDomainStmt *stmt) ...@@ -346,11 +327,8 @@ DefineDomain(CreateDomainStmt *stmt)
Oid domainNamespace; Oid domainNamespace;
AclResult aclresult; AclResult aclresult;
int16 internalLength; int16 internalLength;
int16 externalLength;
Oid inputProcedure; Oid inputProcedure;
Oid outputProcedure; Oid outputProcedure;
Oid receiveProcedure;
Oid sendProcedure;
bool byValue; bool byValue;
char delimiter; char delimiter;
char alignment; char alignment;
...@@ -421,17 +399,12 @@ DefineDomain(CreateDomainStmt *stmt) ...@@ -421,17 +399,12 @@ DefineDomain(CreateDomainStmt *stmt)
/* Storage Length */ /* Storage Length */
internalLength = baseType->typlen; internalLength = baseType->typlen;
/* External Length (unused) */
externalLength = baseType->typprtlen;
/* Array element Delimiter */ /* Array element Delimiter */
delimiter = baseType->typdelim; delimiter = baseType->typdelim;
/* I/O Functions */ /* I/O Functions */
inputProcedure = baseType->typinput; inputProcedure = baseType->typinput;
outputProcedure = baseType->typoutput; outputProcedure = baseType->typoutput;
receiveProcedure = baseType->typreceive;
sendProcedure = baseType->typsend;
/* Inherited default value */ /* Inherited default value */
datum = SysCacheGetAttr(TYPEOID, typeTup, datum = SysCacheGetAttr(TYPEOID, typeTup,
...@@ -549,13 +522,10 @@ DefineDomain(CreateDomainStmt *stmt) ...@@ -549,13 +522,10 @@ DefineDomain(CreateDomainStmt *stmt)
InvalidOid, /* preassigned type oid (none here) */ InvalidOid, /* preassigned type oid (none here) */
InvalidOid, /* relation oid (n/a here) */ InvalidOid, /* relation oid (n/a here) */
internalLength, /* internal size */ internalLength, /* internal size */
externalLength, /* external size */
'd', /* type-type (domain type) */ 'd', /* type-type (domain type) */
delimiter, /* array element delimiter */ delimiter, /* array element delimiter */
inputProcedure, /* input procedure */ inputProcedure, /* input procedure */
outputProcedure, /* output procedure */ outputProcedure, /* output procedure */
receiveProcedure, /* receive procedure */
sendProcedure, /* send procedure */
basetypelem, /* element type ID */ basetypelem, /* element type ID */
basetypeoid, /* base type ID */ basetypeoid, /* base type ID */
defaultValue, /* default type value (text) */ defaultValue, /* default type value (text) */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.105 2002/06/20 20:29:27 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.106 2002/07/24 19:11:09 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -560,7 +560,6 @@ CreateUser(CreateUserStmt *stmt) ...@@ -560,7 +560,6 @@ CreateUser(CreateUserStmt *stmt)
new_record[Anum_pg_shadow_usesysid - 1] = Int32GetDatum(sysid); new_record[Anum_pg_shadow_usesysid - 1] = Int32GetDatum(sysid);
AssertState(BoolIsValid(createdb)); AssertState(BoolIsValid(createdb));
new_record[Anum_pg_shadow_usecreatedb - 1] = BoolGetDatum(createdb); new_record[Anum_pg_shadow_usecreatedb - 1] = BoolGetDatum(createdb);
new_record[Anum_pg_shadow_usetrace - 1] = BoolGetDatum(false);
AssertState(BoolIsValid(createuser)); AssertState(BoolIsValid(createuser));
new_record[Anum_pg_shadow_usesuper - 1] = BoolGetDatum(createuser); new_record[Anum_pg_shadow_usesuper - 1] = BoolGetDatum(createuser);
/* superuser gets catupd right by default */ /* superuser gets catupd right by default */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.196 2002/07/18 17:14:19 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.197 2002/07/24 19:11:10 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2415,8 +2415,6 @@ _copyCreatePLangStmt(CreatePLangStmt *from) ...@@ -2415,8 +2415,6 @@ _copyCreatePLangStmt(CreatePLangStmt *from)
newnode->plname = pstrdup(from->plname); newnode->plname = pstrdup(from->plname);
Node_Copy(from, newnode, plhandler); Node_Copy(from, newnode, plhandler);
Node_Copy(from, newnode, plvalidator); Node_Copy(from, newnode, plvalidator);
if (from->plcompiler)
newnode->plcompiler = pstrdup(from->plcompiler);
newnode->pltrusted = from->pltrusted; newnode->pltrusted = from->pltrusted;
return newnode; return newnode;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.143 2002/07/18 17:14:19 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.144 2002/07/24 19:11:10 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1252,8 +1252,6 @@ _equalCreatePLangStmt(CreatePLangStmt *a, CreatePLangStmt *b) ...@@ -1252,8 +1252,6 @@ _equalCreatePLangStmt(CreatePLangStmt *a, CreatePLangStmt *b)
return false; return false;
if (!equal(a->plvalidator, b->plvalidator)) if (!equal(a->plvalidator, b->plvalidator))
return false; return false;
if (!equalstr(a->plcompiler, b->plcompiler))
return false;
if (a->pltrusted != b->pltrusted) if (a->pltrusted != b->pltrusted)
return false; return false;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.348 2002/07/20 05:58:34 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.349 2002/07/24 19:11:10 petere Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -1931,7 +1931,6 @@ CreatePLangStmt: ...@@ -1931,7 +1931,6 @@ CreatePLangStmt:
n->plname = $5; n->plname = $5;
n->plhandler = $7; n->plhandler = $7;
n->plvalidator = $8; n->plvalidator = $8;
n->plcompiler = $9;
n->pltrusted = $2; n->pltrusted = $2;
$$ = (Node *)n; $$ = (Node *)n;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.24 2002/06/20 20:29:36 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.25 2002/07/24 19:11:10 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -233,15 +233,15 @@ FuNkYfMgRtAbStUfF ...@@ -233,15 +233,15 @@ FuNkYfMgRtAbStUfF
# may seem tedious, but avoid the temptation to write a quick x?y:z # may seem tedious, but avoid the temptation to write a quick x?y:z
# conditional expression instead. Not all awks have conditional expressions. # conditional expression instead. Not all awks have conditional expressions.
# #
# Note assumptions here that prosrc == $(NF-2), pronargs == $12, # Note assumptions here that prosrc == $(NF-2), pronargs == $11,
# proisstrict == $9, proretset == $10 # proisstrict == $8, proretset == $9
$AWK 'BEGIN { $AWK 'BEGIN {
Bool["t"] = "true" Bool["t"] = "true"
Bool["f"] = "false" Bool["f"] = "false"
} }
{ printf (" { %d, \"%s\", %d, %s, %s, %s },\n"), \ { printf (" { %d, \"%s\", %d, %s, %s, %s },\n"), \
$1, $(NF-2), $12, Bool[$9], Bool[$10], $(NF-2) $1, $(NF-2), $11, Bool[$8], Bool[$9], $(NF-2)
}' $RAWFILE >> "$$-$TABLEFILE" }' $RAWFILE >> "$$-$TABLEFILE"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.48 2002/07/20 05:16:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.49 2002/07/24 19:11:11 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -65,10 +65,6 @@ SetDefine(char *querystr, Oid elemType) ...@@ -65,10 +65,6 @@ SetDefine(char *querystr, Oid elemType)
false, /* security invoker */ false, /* security invoker */
false, /* isStrict (irrelevant, no args) */ false, /* isStrict (irrelevant, no args) */
PROVOLATILE_VOLATILE, /* assume unsafe */ PROVOLATILE_VOLATILE, /* assume unsafe */
100, /* byte_pct */
0, /* perbyte_cpu */
0, /* percall_cpu */
100, /* outin_ratio */
0, /* parameterCount */ 0, /* parameterCount */
NULL); /* parameterTypes */ NULL); /* parameterTypes */
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California # Portions Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.161 2002/07/18 23:11:29 petere Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.162 2002/07/24 19:11:11 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -737,7 +737,6 @@ CREATE VIEW pg_user AS \ ...@@ -737,7 +737,6 @@ CREATE VIEW pg_user AS \
usename, \ usename, \
usesysid, \ usesysid, \
usecreatedb, \ usecreatedb, \
usetrace, \
usesuper, \ usesuper, \
usecatupd, \ usecatupd, \
'********'::text as passwd, \ '********'::text as passwd, \
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.274 2002/07/18 23:11:29 petere Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.275 2002/07/24 19:11:11 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -2781,15 +2781,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2781,15 +2781,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
int ntups; int ntups;
int funcInd; int funcInd;
char *typlen; char *typlen;
char *typprtlen;
char *typinput; char *typinput;
char *typoutput; char *typoutput;
char *typreceive;
char *typsend;
char *typinputoid; char *typinputoid;
char *typoutputoid; char *typoutputoid;
char *typreceiveoid;
char *typsendoid;
char *typdelim; char *typdelim;
char *typdefault; char *typdefault;
char *typbyval; char *typbyval;
...@@ -2806,12 +2801,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2806,12 +2801,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
/* Fetch type-specific details */ /* Fetch type-specific details */
if (fout->remoteVersion >= 70300) if (fout->remoteVersion >= 70300)
{ {
appendPQExpBuffer(query, "SELECT typlen, typprtlen, " appendPQExpBuffer(query, "SELECT typlen, "
"typinput, typoutput, typreceive, typsend, " "typinput, typoutput, "
"typinput::pg_catalog.oid as typinputoid, " "typinput::pg_catalog.oid as typinputoid, "
"typoutput::pg_catalog.oid as typoutputoid, " "typoutput::pg_catalog.oid as typoutputoid, "
"typreceive::pg_catalog.oid as typreceiveoid, "
"typsend::pg_catalog.oid as typsendoid, "
"typdelim, typdefault, typbyval, typalign, " "typdelim, typdefault, typbyval, typalign, "
"typstorage " "typstorage "
"FROM pg_catalog.pg_type " "FROM pg_catalog.pg_type "
...@@ -2820,12 +2813,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2820,12 +2813,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
} }
else if (fout->remoteVersion >= 70100) else if (fout->remoteVersion >= 70100)
{ {
appendPQExpBuffer(query, "SELECT typlen, typprtlen, " appendPQExpBuffer(query, "SELECT typlen, "
"typinput, typoutput, typreceive, typsend, " "typinput, typoutput, "
"typinput::oid as typinputoid, " "typinput::oid as typinputoid, "
"typoutput::oid as typoutputoid, " "typoutput::oid as typoutputoid, "
"typreceive::oid as typreceiveoid, "
"typsend::oid as typsendoid, "
"typdelim, typdefault, typbyval, typalign, " "typdelim, typdefault, typbyval, typalign, "
"typstorage " "typstorage "
"FROM pg_type " "FROM pg_type "
...@@ -2834,12 +2825,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2834,12 +2825,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
} }
else else
{ {
appendPQExpBuffer(query, "SELECT typlen, typprtlen, " appendPQExpBuffer(query, "SELECT typlen, "
"typinput, typoutput, typreceive, typsend, " "typinput, typoutput, "
"typinput::oid as typinputoid, " "typinput::oid as typinputoid, "
"typoutput::oid as typoutputoid, " "typoutput::oid as typoutputoid, "
"typreceive::oid as typreceiveoid, "
"typsend::oid as typsendoid, "
"typdelim, typdefault, typbyval, typalign, " "typdelim, typdefault, typbyval, typalign, "
"'p'::char as typstorage " "'p'::char as typstorage "
"FROM pg_type " "FROM pg_type "
...@@ -2866,15 +2855,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2866,15 +2855,10 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
} }
typlen = PQgetvalue(res, 0, PQfnumber(res, "typlen")); typlen = PQgetvalue(res, 0, PQfnumber(res, "typlen"));
typprtlen = PQgetvalue(res, 0, PQfnumber(res, "typprtlen"));
typinput = PQgetvalue(res, 0, PQfnumber(res, "typinput")); typinput = PQgetvalue(res, 0, PQfnumber(res, "typinput"));
typoutput = PQgetvalue(res, 0, PQfnumber(res, "typoutput")); typoutput = PQgetvalue(res, 0, PQfnumber(res, "typoutput"));
typreceive = PQgetvalue(res, 0, PQfnumber(res, "typreceive"));
typsend = PQgetvalue(res, 0, PQfnumber(res, "typsend"));
typinputoid = PQgetvalue(res, 0, PQfnumber(res, "typinputoid")); typinputoid = PQgetvalue(res, 0, PQfnumber(res, "typinputoid"));
typoutputoid = PQgetvalue(res, 0, PQfnumber(res, "typoutputoid")); typoutputoid = PQgetvalue(res, 0, PQfnumber(res, "typoutputoid"));
typreceiveoid = PQgetvalue(res, 0, PQfnumber(res, "typreceiveoid"));
typsendoid = PQgetvalue(res, 0, PQfnumber(res, "typsendoid"));
typdelim = PQgetvalue(res, 0, PQfnumber(res, "typdelim")); typdelim = PQgetvalue(res, 0, PQfnumber(res, "typdelim"));
if (PQgetisnull(res, 0, PQfnumber(res, "typdefault"))) if (PQgetisnull(res, 0, PQfnumber(res, "typdefault")))
typdefault = NULL; typdefault = NULL;
...@@ -2898,20 +2882,6 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2898,20 +2882,6 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
if (funcInd >= 0 && g_finfo[funcInd].pronamespace->dump) if (funcInd >= 0 && g_finfo[funcInd].pronamespace->dump)
(*deps)[depIdx++] = strdup(typoutputoid); (*deps)[depIdx++] = strdup(typoutputoid);
if (strcmp(typreceiveoid, typinputoid) != 0)
{
funcInd = findFuncByOid(g_finfo, numFuncs, typreceiveoid);
if (funcInd >= 0 && g_finfo[funcInd].pronamespace->dump)
(*deps)[depIdx++] = strdup(typreceiveoid);
}
if (strcmp(typsendoid, typoutputoid) != 0)
{
funcInd = findFuncByOid(g_finfo, numFuncs, typsendoid);
if (funcInd >= 0 && g_finfo[funcInd].pronamespace->dump)
(*deps)[depIdx++] = strdup(typsendoid);
}
/* DROP must be fully qualified in case same name appears in pg_catalog */ /* DROP must be fully qualified in case same name appears in pg_catalog */
appendPQExpBuffer(delq, "DROP TYPE %s.", appendPQExpBuffer(delq, "DROP TYPE %s.",
fmtId(tinfo->typnamespace->nspname, force_quotes)); fmtId(tinfo->typnamespace->nspname, force_quotes));
...@@ -2920,17 +2890,15 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2920,17 +2890,15 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
appendPQExpBuffer(q, appendPQExpBuffer(q,
"CREATE TYPE %s " "CREATE TYPE %s "
"( internallength = %s, externallength = %s,", "( internallength = %s,",
fmtId(tinfo->typname, force_quotes), fmtId(tinfo->typname, force_quotes),
(strcmp(typlen, "-1") == 0) ? "variable" : typlen, (strcmp(typlen, "-1") == 0) ? "variable" : typlen);
(strcmp(typprtlen, "-1") == 0) ? "variable" : typprtlen);
if (fout->remoteVersion >= 70300) if (fout->remoteVersion >= 70300)
{ {
/* regproc result is correctly quoted in 7.3 */ /* regproc result is correctly quoted in 7.3 */
appendPQExpBuffer(q, " input = %s, output = %s, " appendPQExpBuffer(q, " input = %s, output = %s, ",
"send = %s, receive = %s", typinput, typoutput);
typinput, typoutput, typsend, typreceive);
} }
else else
{ {
...@@ -2940,10 +2908,6 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo, ...@@ -2940,10 +2908,6 @@ dumpOneBaseType(Archive *fout, TypeInfo *tinfo,
fmtId(typinput, force_quotes)); fmtId(typinput, force_quotes));
appendPQExpBuffer(q, " output = %s,", appendPQExpBuffer(q, " output = %s,",
fmtId(typoutput, force_quotes)); fmtId(typoutput, force_quotes));
appendPQExpBuffer(q, " send = %s,",
fmtId(typsend, force_quotes));
appendPQExpBuffer(q, " receive = %s",
fmtId(typreceive, force_quotes));
} }
if (typdefault != NULL) if (typdefault != NULL)
...@@ -3167,11 +3131,9 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs) ...@@ -3167,11 +3131,9 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs)
int i_lanpltrusted; int i_lanpltrusted;
int i_lanplcallfoid; int i_lanplcallfoid;
int i_lanvalidator = -1; int i_lanvalidator = -1;
int i_lancompiler;
int i_lanacl = -1; int i_lanacl = -1;
char *lanoid; char *lanoid;
char *lanname; char *lanname;
char *lancompiler;
char *lanacl; char *lanacl;
const char *lanplcallfoid; const char *lanplcallfoid;
const char *lanvalidator; const char *lanvalidator;
...@@ -3200,7 +3162,6 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs) ...@@ -3200,7 +3162,6 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs)
i_lanname = PQfnumber(res, "lanname"); i_lanname = PQfnumber(res, "lanname");
i_lanpltrusted = PQfnumber(res, "lanpltrusted"); i_lanpltrusted = PQfnumber(res, "lanpltrusted");
i_lanplcallfoid = PQfnumber(res, "lanplcallfoid"); i_lanplcallfoid = PQfnumber(res, "lanplcallfoid");
i_lancompiler = PQfnumber(res, "lancompiler");
i_oid = PQfnumber(res, "oid"); i_oid = PQfnumber(res, "oid");
if (fout->remoteVersion >= 70300) if (fout->remoteVersion >= 70300)
{ {
...@@ -3213,7 +3174,6 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs) ...@@ -3213,7 +3174,6 @@ dumpProcLangs(Archive *fout, FuncInfo finfo[], int numFuncs)
lanoid = PQgetvalue(res, i, i_oid); lanoid = PQgetvalue(res, i, i_oid);
lanplcallfoid = PQgetvalue(res, i, i_lanplcallfoid); lanplcallfoid = PQgetvalue(res, i, i_lanplcallfoid);
lanname = PQgetvalue(res, i, i_lanname); lanname = PQgetvalue(res, i, i_lanname);
lancompiler = PQgetvalue(res, i, i_lancompiler);
if (fout->remoteVersion >= 70300) if (fout->remoteVersion >= 70300)
{ {
lanvalidator = PQgetvalue(res, i, i_lanvalidator); lanvalidator = PQgetvalue(res, i, i_lanvalidator);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: catversion.h,v 1.141 2002/07/18 23:11:30 petere Exp $ * $Id: catversion.h,v 1.142 2002/07/24 19:11:12 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -53,6 +53,6 @@ ...@@ -53,6 +53,6 @@
*/ */
/* yyyymmddN */ /* yyyymmddN */
#define CATALOG_VERSION_NO 200207191 #define CATALOG_VERSION_NO 200207241
#endif #endif
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_class.h,v 1.68 2002/06/20 20:29:44 momjian Exp $ * $Id: pg_class.h,v 1.69 2002/07/24 19:11:12 petere Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -134,15 +134,15 @@ typedef FormData_pg_class *Form_pg_class; ...@@ -134,15 +134,15 @@ typedef FormData_pg_class *Form_pg_class;
* ---------------- * ----------------
*/ */
DATA(insert OID = 1247 ( pg_type PGNSP 71 PGUID 0 1247 0 0 0 0 f f r 23 0 0 0 0 0 t f f f _null_ )); DATA(insert OID = 1247 ( pg_type PGNSP 71 PGUID 0 1247 0 0 0 0 f f r 20 0 0 0 0 0 t f f f _null_ ));
DESCR(""); DESCR("");
DATA(insert OID = 1249 ( pg_attribute PGNSP 75 PGUID 0 1249 0 0 0 0 f f r 15 0 0 0 0 0 f f f f _null_ )); DATA(insert OID = 1249 ( pg_attribute PGNSP 75 PGUID 0 1249 0 0 0 0 f f r 15 0 0 0 0 0 f f f f _null_ ));
DESCR(""); DESCR("");
DATA(insert OID = 1255 ( pg_proc PGNSP 81 PGUID 0 1255 0 0 0 0 f f r 20 0 0 0 0 0 t f f f _null_ )); DATA(insert OID = 1255 ( pg_proc PGNSP 81 PGUID 0 1255 0 0 0 0 f f r 15 0 0 0 0 0 t f f f _null_ ));
DESCR(""); DESCR("");
DATA(insert OID = 1259 ( pg_class PGNSP 83 PGUID 0 1259 0 0 0 0 f f r 24 0 0 0 0 0 t f f f _null_ )); DATA(insert OID = 1259 ( pg_class PGNSP 83 PGUID 0 1259 0 0 0 0 f f r 24 0 0 0 0 0 t f f f _null_ ));
DESCR(""); DESCR("");
DATA(insert OID = 1260 ( pg_shadow PGNSP 86 PGUID 0 1260 0 0 0 0 f t r 9 0 0 0 0 0 f f f f _null_ )); DATA(insert OID = 1260 ( pg_shadow PGNSP 86 PGUID 0 1260 0 0 0 0 f t r 8 0 0 0 0 0 f f f f _null_ ));
DESCR(""); DESCR("");
DATA(insert OID = 1261 ( pg_group PGNSP 87 PGUID 0 1261 0 0 0 0 f t r 3 0 0 0 0 0 f f f f _null_ )); DATA(insert OID = 1261 ( pg_group PGNSP 87 PGUID 0 1261 0 0 0 0 f t r 3 0 0 0 0 0 f f f f _null_ ));
DESCR(""); DESCR("");
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_language.h,v 1.18 2002/06/20 20:29:44 momjian Exp $ * $Id: pg_language.h,v 1.19 2002/07/24 19:11:12 petere Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -38,7 +38,6 @@ CATALOG(pg_language) ...@@ -38,7 +38,6 @@ CATALOG(pg_language)
bool lanpltrusted; /* PL is trusted */ bool lanpltrusted; /* PL is trusted */
Oid lanplcallfoid; /* Call handler for PL */ Oid lanplcallfoid; /* Call handler for PL */
Oid lanvalidator; /* optional validation function */ Oid lanvalidator; /* optional validation function */
text lancompiler; /* VARIABLE LENGTH FIELD */
aclitem lanacl[1]; /* Access privileges */ aclitem lanacl[1]; /* Access privileges */
} FormData_pg_language; } FormData_pg_language;
...@@ -53,27 +52,26 @@ typedef FormData_pg_language *Form_pg_language; ...@@ -53,27 +52,26 @@ typedef FormData_pg_language *Form_pg_language;
* compiler constants for pg_language * compiler constants for pg_language
* ---------------- * ----------------
*/ */
#define Natts_pg_language 7 #define Natts_pg_language 6
#define Anum_pg_language_lanname 1 #define Anum_pg_language_lanname 1
#define Anum_pg_language_lanispl 2 #define Anum_pg_language_lanispl 2
#define Anum_pg_language_lanpltrusted 3 #define Anum_pg_language_lanpltrusted 3
#define Anum_pg_language_lanplcallfoid 4 #define Anum_pg_language_lanplcallfoid 4
#define Anum_pg_language_lanvalidator 5 #define Anum_pg_language_lanvalidator 5
#define Anum_pg_language_lancompiler 6 #define Anum_pg_language_lanacl 6
#define Anum_pg_language_lanacl 7
/* ---------------- /* ----------------
* initial contents of pg_language * initial contents of pg_language
* ---------------- * ----------------
*/ */
DATA(insert OID = 12 ( "internal" f f 0 2246 "n/a" _null_ )); DATA(insert OID = 12 ( "internal" f f 0 2246 _null_ ));
DESCR("Built-in functions"); DESCR("Built-in functions");
#define INTERNALlanguageId 12 #define INTERNALlanguageId 12
DATA(insert OID = 13 ( "c" f f 0 2247 "/bin/cc" _null_ )); DATA(insert OID = 13 ( "c" f f 0 2247 _null_ ));
DESCR("Dynamically-loaded C functions"); DESCR("Dynamically-loaded C functions");
#define ClanguageId 13 #define ClanguageId 13
DATA(insert OID = 14 ( "sql" f t 0 2248 "postgres" _null_ )); DATA(insert OID = 14 ( "sql" f t 0 2248 _null_ ));
DESCR("SQL-language functions"); DESCR("SQL-language functions");
#define SQLlanguageId 14 #define SQLlanguageId 14
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_shadow.h,v 1.21 2002/06/20 20:29:49 momjian Exp $ * $Id: pg_shadow.h,v 1.22 2002/07/24 19:11:13 petere Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -34,7 +34,6 @@ CATALOG(pg_shadow) BOOTSTRAP BKI_SHARED_RELATION BKI_WITHOUT_OIDS ...@@ -34,7 +34,6 @@ CATALOG(pg_shadow) BOOTSTRAP BKI_SHARED_RELATION BKI_WITHOUT_OIDS
NameData usename; NameData usename;
int4 usesysid; int4 usesysid;
bool usecreatedb; bool usecreatedb;
bool usetrace;
bool usesuper; /* read this field via superuser() only */ bool usesuper; /* read this field via superuser() only */
bool usecatupd; bool usecatupd;
/* remaining fields may be null; use heap_getattr to read them! */ /* remaining fields may be null; use heap_getattr to read them! */
...@@ -54,16 +53,15 @@ typedef FormData_pg_shadow *Form_pg_shadow; ...@@ -54,16 +53,15 @@ typedef FormData_pg_shadow *Form_pg_shadow;
* compiler constants for pg_shadow * compiler constants for pg_shadow
* ---------------- * ----------------
*/ */
#define Natts_pg_shadow 9 #define Natts_pg_shadow 8
#define Anum_pg_shadow_usename 1 #define Anum_pg_shadow_usename 1
#define Anum_pg_shadow_usesysid 2 #define Anum_pg_shadow_usesysid 2
#define Anum_pg_shadow_usecreatedb 3 #define Anum_pg_shadow_usecreatedb 3
#define Anum_pg_shadow_usetrace 4 #define Anum_pg_shadow_usesuper 4
#define Anum_pg_shadow_usesuper 5 #define Anum_pg_shadow_usecatupd 5
#define Anum_pg_shadow_usecatupd 6 #define Anum_pg_shadow_passwd 6
#define Anum_pg_shadow_passwd 7 #define Anum_pg_shadow_valuntil 7
#define Anum_pg_shadow_valuntil 8 #define Anum_pg_shadow_useconfig 8
#define Anum_pg_shadow_useconfig 9
/* ---------------- /* ----------------
* initial contents of pg_shadow * initial contents of pg_shadow
...@@ -72,7 +70,7 @@ typedef FormData_pg_shadow *Form_pg_shadow; ...@@ -72,7 +70,7 @@ typedef FormData_pg_shadow *Form_pg_shadow;
* user choices. * user choices.
* ---------------- * ----------------
*/ */
DATA(insert ( "POSTGRES" PGUID t t t t _null_ _null_ _null_ )); DATA(insert ( "POSTGRES" PGUID t t t _null_ _null_ _null_ ));
#define BOOTSTRAP_USESYSID 1 #define BOOTSTRAP_USESYSID 1
......
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: parsenodes.h,v 1.193 2002/07/18 23:11:32 petere Exp $ * $Id: parsenodes.h,v 1.194 2002/07/24 19:11:14 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1012,7 +1012,6 @@ typedef struct CreatePLangStmt ...@@ -1012,7 +1012,6 @@ typedef struct CreatePLangStmt
char *plname; /* PL name */ char *plname; /* PL name */
List *plhandler; /* PL call handler function (qual. name) */ List *plhandler; /* PL call handler function (qual. name) */
List *plvalidator; /* optional validator function (qual. name) */ List *plvalidator; /* optional validator function (qual. name) */
char *plcompiler; /* lancompiler text */
bool pltrusted; /* PL is trusted */ bool pltrusted; /* PL is trusted */
} CreatePLangStmt; } CreatePLangStmt;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: cost.h,v 1.45 2002/06/20 20:29:51 momjian Exp $ * $Id: cost.h,v 1.46 2002/07/24 19:11:14 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -25,12 +25,6 @@ ...@@ -25,12 +25,6 @@
#define DEFAULT_CPU_INDEX_TUPLE_COST 0.001 #define DEFAULT_CPU_INDEX_TUPLE_COST 0.001
#define DEFAULT_CPU_OPERATOR_COST 0.0025 #define DEFAULT_CPU_OPERATOR_COST 0.0025
/* defaults for function attributes used for expensive function calculations */
#define BYTE_PCT 100
#define PERBYTE_CPU 0
#define PERCALL_CPU 0
#define OUTIN_RATIO 100
/* /*
* prototypes for costsize.c * prototypes for costsize.c
......
...@@ -417,19 +417,3 @@ WHERE pg_type.typoutput != 0 AND ...@@ -417,19 +417,3 @@ WHERE pg_type.typoutput != 0 AND
------+----------- ------+-----------
(0 rows) (0 rows)
SELECT ctid, pg_type.typreceive
FROM pg_type
WHERE pg_type.typreceive != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_type.typreceive);
ctid | typreceive
------+------------
(0 rows)
SELECT ctid, pg_type.typsend
FROM pg_type
WHERE pg_type.typsend != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_type.typsend);
ctid | typsend
------+---------
(0 rows)
...@@ -1288,7 +1288,7 @@ SELECT viewname, definition FROM pg_views ORDER BY viewname; ...@@ -1288,7 +1288,7 @@ SELECT viewname, definition FROM pg_views ORDER BY viewname;
pg_statio_user_tables | SELECT pg_statio_all_tables.relid, pg_statio_all_tables.relname, pg_statio_all_tables.heap_blks_read, pg_statio_all_tables.heap_blks_hit, pg_statio_all_tables.idx_blks_read, pg_statio_all_tables.idx_blks_hit, pg_statio_all_tables.toast_blks_read, pg_statio_all_tables.toast_blks_hit, pg_statio_all_tables.tidx_blks_read, pg_statio_all_tables.tidx_blks_hit FROM pg_statio_all_tables WHERE (pg_statio_all_tables.relname !~ '^pg_'::text); pg_statio_user_tables | SELECT pg_statio_all_tables.relid, pg_statio_all_tables.relname, pg_statio_all_tables.heap_blks_read, pg_statio_all_tables.heap_blks_hit, pg_statio_all_tables.idx_blks_read, pg_statio_all_tables.idx_blks_hit, pg_statio_all_tables.toast_blks_read, pg_statio_all_tables.toast_blks_hit, pg_statio_all_tables.tidx_blks_read, pg_statio_all_tables.tidx_blks_hit FROM pg_statio_all_tables WHERE (pg_statio_all_tables.relname !~ '^pg_'::text);
pg_stats | SELECT c.relname AS tablename, a.attname, s.stanullfrac AS null_frac, s.stawidth AS avg_width, s.stadistinct AS n_distinct, CASE WHEN (1 = s.stakind1) THEN s.stavalues1 WHEN (1 = s.stakind2) THEN s.stavalues2 WHEN (1 = s.stakind3) THEN s.stavalues3 WHEN (1 = s.stakind4) THEN s.stavalues4 ELSE NULL::text[] END AS most_common_vals, CASE WHEN (1 = s.stakind1) THEN s.stanumbers1 WHEN (1 = s.stakind2) THEN s.stanumbers2 WHEN (1 = s.stakind3) THEN s.stanumbers3 WHEN (1 = s.stakind4) THEN s.stanumbers4 ELSE NULL::real[] END AS most_common_freqs, CASE WHEN (2 = s.stakind1) THEN s.stavalues1 WHEN (2 = s.stakind2) THEN s.stavalues2 WHEN (2 = s.stakind3) THEN s.stavalues3 WHEN (2 = s.stakind4) THEN s.stavalues4 ELSE NULL::text[] END AS histogram_bounds, CASE WHEN (3 = s.stakind1) THEN s.stanumbers1[1] WHEN (3 = s.stakind2) THEN s.stanumbers2[1] WHEN (3 = s.stakind3) THEN s.stanumbers3[1] WHEN (3 = s.stakind4) THEN s.stanumbers4[1] ELSE NULL::real END AS correlation FROM pg_class c, pg_attribute a, pg_statistic s WHERE ((((c.oid = s.starelid) AND (c.oid = a.attrelid)) AND (a.attnum = s.staattnum)) AND has_table_privilege(c.oid, 'select'::text)); pg_stats | SELECT c.relname AS tablename, a.attname, s.stanullfrac AS null_frac, s.stawidth AS avg_width, s.stadistinct AS n_distinct, CASE WHEN (1 = s.stakind1) THEN s.stavalues1 WHEN (1 = s.stakind2) THEN s.stavalues2 WHEN (1 = s.stakind3) THEN s.stavalues3 WHEN (1 = s.stakind4) THEN s.stavalues4 ELSE NULL::text[] END AS most_common_vals, CASE WHEN (1 = s.stakind1) THEN s.stanumbers1 WHEN (1 = s.stakind2) THEN s.stanumbers2 WHEN (1 = s.stakind3) THEN s.stanumbers3 WHEN (1 = s.stakind4) THEN s.stanumbers4 ELSE NULL::real[] END AS most_common_freqs, CASE WHEN (2 = s.stakind1) THEN s.stavalues1 WHEN (2 = s.stakind2) THEN s.stavalues2 WHEN (2 = s.stakind3) THEN s.stavalues3 WHEN (2 = s.stakind4) THEN s.stavalues4 ELSE NULL::text[] END AS histogram_bounds, CASE WHEN (3 = s.stakind1) THEN s.stanumbers1[1] WHEN (3 = s.stakind2) THEN s.stanumbers2[1] WHEN (3 = s.stakind3) THEN s.stanumbers3[1] WHEN (3 = s.stakind4) THEN s.stanumbers4[1] ELSE NULL::real END AS correlation FROM pg_class c, pg_attribute a, pg_statistic s WHERE ((((c.oid = s.starelid) AND (c.oid = a.attrelid)) AND (a.attnum = s.staattnum)) AND has_table_privilege(c.oid, 'select'::text));
pg_tables | SELECT c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.reltriggers > 0) AS hastriggers FROM pg_class c WHERE ((c.relkind = 'r'::"char") OR (c.relkind = 's'::"char")); pg_tables | SELECT c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.reltriggers > 0) AS hastriggers FROM pg_class c WHERE ((c.relkind = 'r'::"char") OR (c.relkind = 's'::"char"));
pg_user | SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usetrace, pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd, pg_shadow.valuntil, pg_shadow.useconfig FROM pg_shadow; pg_user | SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd, pg_shadow.valuntil, pg_shadow.useconfig FROM pg_shadow;
pg_views | SELECT n.nspname AS schemaname, c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.oid) AS definition FROM (pg_class c LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace))) WHERE (c.relkind = 'v'::"char"); pg_views | SELECT n.nspname AS schemaname, c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.oid) AS definition FROM (pg_class c LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace))) WHERE (c.relkind = 'v'::"char");
rtest_v1 | SELECT rtest_t1.a, rtest_t1.b FROM rtest_t1; rtest_v1 | SELECT rtest_t1.a, rtest_t1.b FROM rtest_t1;
rtest_vcomp | SELECT x.part, (x.size * y.factor) AS size_in_cm FROM rtest_comp x, rtest_unitfact y WHERE (x.unit = y.unit); rtest_vcomp | SELECT x.part, (x.size * y.factor) AS size_in_cm FROM rtest_comp x, rtest_unitfact y WHERE (x.unit = y.unit);
......
...@@ -85,8 +85,7 @@ WHERE p1.typtype != 'c' AND p1.typname LIKE '\\_%' AND NOT EXISTS ...@@ -85,8 +85,7 @@ WHERE p1.typtype != 'c' AND p1.typname LIKE '\\_%' AND NOT EXISTS
SELECT p1.oid, p1.typname SELECT p1.oid, p1.typname
FROM pg_type as p1 FROM pg_type as p1
WHERE p1.typtype != 'c' AND WHERE p1.typtype != 'c' AND
(p1.typinput = 0 OR p1.typoutput = 0 OR (p1.typinput = 0 OR p1.typoutput = 0);
p1.typreceive = 0 OR p1.typsend = 0);
oid | typname oid | typname
-----+--------- -----+---------
(0 rows) (0 rows)
...@@ -117,32 +116,6 @@ WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND ...@@ -117,32 +116,6 @@ WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND
-----+---------+-----+--------- -----+---------+-----+---------
(0 rows) (0 rows)
-- Check for bogus typreceive routines
-- FIXME: ought to check prorettype, but there are special cases that make it
-- hard: prorettype might be binary-compatible with the type but not the same,
-- and for array types array_in's result has nothing to do with anything.
SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
(p2.pronargs != 1 OR p2.proretset) AND
(p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 'int4'::regtype);
oid | typname | oid | proname
-----+---------+-----+---------
(0 rows)
-- Check for bogus typsend routines
-- The first OR subclause detects bogus non-array cases,
-- the second one detects bogus array cases.
-- FIXME: ought to check prorettype, but not clear what it should be.
SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
(p2.pronargs != 1 OR p2.proretset) AND
(p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
oid | typname | oid | proname
-----+---------+-----+---------
(0 rows)
-- **************** pg_class **************** -- **************** pg_class ****************
-- Look for illegal values in pg_class fields -- Look for illegal values in pg_class fields
SELECT p1.oid, p1.relname SELECT p1.oid, p1.relname
......
...@@ -209,11 +209,3 @@ SELECT ctid, pg_type.typoutput ...@@ -209,11 +209,3 @@ SELECT ctid, pg_type.typoutput
FROM pg_type FROM pg_type
WHERE pg_type.typoutput != 0 AND WHERE pg_type.typoutput != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_type.typoutput); NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_type.typoutput);
SELECT ctid, pg_type.typreceive
FROM pg_type
WHERE pg_type.typreceive != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_type.typreceive);
SELECT ctid, pg_type.typsend
FROM pg_type
WHERE pg_type.typsend != 0 AND
NOT EXISTS(SELECT * FROM pg_proc AS t1 WHERE t1.oid = pg_type.typsend);
...@@ -73,8 +73,7 @@ WHERE p1.typtype != 'c' AND p1.typname LIKE '\\_%' AND NOT EXISTS ...@@ -73,8 +73,7 @@ WHERE p1.typtype != 'c' AND p1.typname LIKE '\\_%' AND NOT EXISTS
SELECT p1.oid, p1.typname SELECT p1.oid, p1.typname
FROM pg_type as p1 FROM pg_type as p1
WHERE p1.typtype != 'c' AND WHERE p1.typtype != 'c' AND
(p1.typinput = 0 OR p1.typoutput = 0 OR (p1.typinput = 0 OR p1.typoutput = 0);
p1.typreceive = 0 OR p1.typsend = 0);
-- Check for bogus typinput routines -- Check for bogus typinput routines
-- FIXME: ought to check prorettype, but there are special cases that make it -- FIXME: ought to check prorettype, but there are special cases that make it
...@@ -98,28 +97,6 @@ WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND ...@@ -98,28 +97,6 @@ WHERE p1.typoutput = p2.oid AND p1.typtype = 'b' AND
(p2.pronargs != 1 OR p2.proretset) AND (p2.pronargs != 1 OR p2.proretset) AND
(p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0); (p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
-- Check for bogus typreceive routines
-- FIXME: ought to check prorettype, but there are special cases that make it
-- hard: prorettype might be binary-compatible with the type but not the same,
-- and for array types array_in's result has nothing to do with anything.
SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typreceive = p2.oid AND p1.typtype = 'b' AND
(p2.pronargs != 1 OR p2.proretset) AND
(p2.pronargs != 3 OR p2.proretset OR p2.proargtypes[2] != 'int4'::regtype);
-- Check for bogus typsend routines
-- The first OR subclause detects bogus non-array cases,
-- the second one detects bogus array cases.
-- FIXME: ought to check prorettype, but not clear what it should be.
SELECT p1.oid, p1.typname, p2.oid, p2.proname
FROM pg_type AS p1, pg_proc AS p2
WHERE p1.typsend = p2.oid AND p1.typtype = 'b' AND
(p2.pronargs != 1 OR p2.proretset) AND
(p2.pronargs != 2 OR p2.proretset OR p1.typelem = 0);
-- **************** pg_class **************** -- **************** pg_class ****************
-- Look for illegal values in pg_class fields -- Look for illegal values in pg_class fields
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment