Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 739adf3

Browse files
committed
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.)
1 parent a787775 commit 739adf3

36 files changed

+2331
-2803
lines changed

doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Documentation of the system catalogs, directed toward PostgreSQL developers
3-
$Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.47 2002/07/24 05:51:55 ishii Exp $
3+
$Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.48 2002/07/24 19:11:06 petere Exp $
44
-->
55

66
<chapter id="catalogs">
@@ -1734,13 +1734,6 @@
17341734
</entry>
17351735
</row>
17361736

1737-
<row>
1738-
<entry>lancompiler</entry>
1739-
<entry><type>text</type></entry>
1740-
<entry></entry>
1741-
<entry>not currently used</entry>
1742-
</row>
1743-
17441737
<row>
17451738
<entry>lanacl</entry>
17461739
<entry><type>aclitem[]</type></entry>
@@ -1976,14 +1969,6 @@
19761969
<entry>Owner (creator) of the operator</entry>
19771970
</row>
19781971

1979-
<row>
1980-
<entry>oprprec</entry>
1981-
<entry><type>int2</type></entry>
1982-
<entry></entry>
1983-
<entry>precedence (currently unused, as precedences are hard-wired
1984-
in the grammar)</entry>
1985-
</row>
1986-
19871972
<row>
19881973
<entry>oprkind</entry>
19891974
<entry><type>char</type></entry>
@@ -1994,14 +1979,6 @@
19941979
</entry>
19951980
</row>
19961981

1997-
<row>
1998-
<entry>oprisleft</entry>
1999-
<entry><type>bool</type></entry>
2000-
<entry></entry>
2001-
<entry>left-associativity (currently unused, as this is hard-wired
2002-
in the grammar)</entry>
2003-
</row>
2004-
20051982
<row>
20061983
<entry>oprcanhash</entry>
20071984
<entry><type>bool</type></entry>
@@ -2185,13 +2162,6 @@
21852162
<entry>not functional</entry>
21862163
</row>
21872164

2188-
<row>
2189-
<entry>proimplicit</entry>
2190-
<entry><type>bool</type></entry>
2191-
<entry></entry>
2192-
<entry>Function may be invoked as an implicit type coercion</entry>
2193-
</row>
2194-
21952165
<row>
21962166
<entry>proisstrict</entry>
21972167
<entry><type>bool</type></entry>
@@ -2252,34 +2222,6 @@
22522222
<entry>A vector with the data types of the function arguments</entry>
22532223
</row>
22542224

2255-
<row>
2256-
<entry>probyte_pct</entry>
2257-
<entry><type>int4</type></entry>
2258-
<entry></entry>
2259-
<entry>dead code</entry>
2260-
</row>
2261-
2262-
<row>
2263-
<entry>properbyte_cpu</entry>
2264-
<entry><type>int4</type></entry>
2265-
<entry></entry>
2266-
<entry>dead code</entry>
2267-
</row>
2268-
2269-
<row>
2270-
<entry>propercall_cpu</entry>
2271-
<entry><type>int4</type></entry>
2272-
<entry></entry>
2273-
<entry>dead code</entry>
2274-
</row>
2275-
2276-
<row>
2277-
<entry>prooutin_ratio</entry>
2278-
<entry><type>int4</type></entry>
2279-
<entry></entry>
2280-
<entry>dead code</entry>
2281-
</row>
2282-
22832225
<row>
22842226
<entry>prosrc</entry>
22852227
<entry><type>text</type></entry>
@@ -2471,13 +2413,6 @@
24712413
<entry>User may create databases</entry>
24722414
</row>
24732415

2474-
<row>
2475-
<entry>usetrace</entry>
2476-
<entry><type>bool</type></entry>
2477-
<entry></entry>
2478-
<entry>not used</entry>
2479-
</row>
2480-
24812416
<row>
24822417
<entry>usesuper</entry>
24832418
<entry><type>bool</type></entry>
@@ -2843,13 +2778,6 @@
28432778
<entry>Length of the storage representation of the type, -1 if variable length</entry>
28442779
</row>
28452780

2846-
<row>
2847-
<entry>typprtlen</entry>
2848-
<entry><type>int2</type></entry>
2849-
<entry></entry>
2850-
<entry>unused</entry>
2851-
</row>
2852-
28532781
<row>
28542782
<entry>typbyval</entry>
28552783
<entry><type>bool</type></entry>
@@ -2952,20 +2880,6 @@
29522880
<entry>Output function</entry>
29532881
</row>
29542882

2955-
<row>
2956-
<entry>typreceive</entry>
2957-
<entry><type>regproc</type></entry>
2958-
<entry>pg_proc.oid</entry>
2959-
<entry>unused</entry>
2960-
</row>
2961-
2962-
<row>
2963-
<entry>typsend</entry>
2964-
<entry><type>regproc</type></entry>
2965-
<entry>pg_proc.oid</entry>
2966-
<entry>unused</entry>
2967-
</row>
2968-
29692883
<row>
29702884
<entry>typalign</entry>
29712885
<entry><type>char</type></entry>

doc/src/sgml/ref/create_function.sgml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.40 2002/07/18 23:11:27 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.41 2002/07/24 19:11:07 petere Exp $
33
-->
44

55
<refentry id="SQL-CREATEFUNCTION">
@@ -257,16 +257,11 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
257257
</varlistentry>
258258

259259
<varlistentry>
260-
<term>isImmutable</term>
261260
<term>isCachable</term>
262-
<term>isStable</term>
263-
<term>isVolatile</term>
264261
<listitem>
265262
<para>
266-
Equivalent to <literal>IMMUTABLE</literal>,
267-
<literal>STABLE</literal>, <literal>VOLATILE</literal>.
268263
<literal>isCachable</literal> is an obsolete equivalent of
269-
<literal>isImmutable</literal>; it's still accepted for
264+
<literal>IMMUTABLE</literal>; it's still accepted for
270265
backwards-compatibility reasons.
271266
</para>
272267
</listitem>

doc/src/sgml/ref/create_language.sgml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.25 2002/06/20 15:44:06 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_language.sgml,v 1.26 2002/07/24 19:11:07 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -221,14 +221,13 @@ ERROR: PL handler function <replaceable class="parameter">funcname</replaceable
221221
lanpltrusted | boolean |
222222
lanplcallfoid | oid |
223223
lanvalidator | oid |
224-
lancompiler | text |
225224
lanacl | aclitem[] |
226225

227-
lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator | lancompiler | lanacl
228-
-------------+---------+--------------+---------------+--------------+-------------+--------
229-
internal | f | f | 0 | 2246 | n/a |
230-
c | f | f | 0 | 2247 | /bin/cc |
231-
sql | f | t | 0 | 2248 | postgres | {=U}
226+
lanname | lanispl | lanpltrusted | lanplcallfoid | lanvalidator | lanacl
227+
-------------+---------+--------------+---------------+--------------+--------
228+
internal | f | f | 0 | 2246 |
229+
c | f | f | 0 | 2247 |
230+
sql | f | t | 0 | 2248 | {=U}
232231
</screen>
233232
</para>
234233

doc/src/sgml/ref/create_type.sgml

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.29 2002/05/18 15:44:47 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.30 2002/07/24 19:11:07 petere Exp $
33
PostgreSQL documentation
44
-->
55

@@ -24,10 +24,8 @@ PostgreSQL documentation
2424
CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <replaceable class="parameter">input_function</replaceable>, OUTPUT = <replaceable class="parameter">output_function</replaceable>
2525
, INTERNALLENGTH = { <replaceable
2626
class="parameter">internallength</replaceable> | VARIABLE }
27-
[ , EXTERNALLENGTH = { <replaceable class="parameter">externallength</replaceable> | VARIABLE } ]
2827
[ , DEFAULT = <replaceable class="parameter">default</replaceable> ]
2928
[ , ELEMENT = <replaceable class="parameter">element</replaceable> ] [ , DELIMITER = <replaceable class="parameter">delimiter</replaceable> ]
30-
[ , SEND = <replaceable class="parameter">send_function</replaceable> ] [ , RECEIVE = <replaceable class="parameter">receive_function</replaceable> ]
3129
[ , PASSEDBYVALUE ]
3230
[ , ALIGNMENT = <replaceable class="parameter">alignment</replaceable> ]
3331
[ , STORAGE = <replaceable class="parameter">storage</replaceable> ]
@@ -63,16 +61,6 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep
6361
</listitem>
6462
</varlistentry>
6563

66-
<varlistentry>
67-
<term><replaceable class="parameter">externallength</replaceable></term>
68-
<listitem>
69-
<para>
70-
A literal value, which specifies the external (displayed) length of
71-
the new type.
72-
</para>
73-
</listitem>
74-
</varlistentry>
75-
7664
<varlistentry>
7765
<term><replaceable class="parameter">input_function</replaceable></term>
7866
<listitem>
@@ -126,26 +114,6 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep
126114
</para>
127115
</listitem>
128116
</varlistentry>
129-
<varlistentry>
130-
<term><replaceable class="parameter">send_function</replaceable></term>
131-
<listitem>
132-
<para>
133-
The name of a function, created by <command>CREATE FUNCTION</command>, which
134-
converts data of this type into a form suitable for
135-
transmission to another machine.
136-
</para>
137-
</listitem>
138-
</varlistentry>
139-
<varlistentry>
140-
<term><replaceable class="parameter">receive_function</replaceable></term>
141-
<listitem>
142-
<para>
143-
The name of a function, created by <command>CREATE FUNCTION</command>, which
144-
converts data of this type from a form suitable for
145-
transmission from another machine to internal form.
146-
</para>
147-
</listitem>
148-
</varlistentry>
149117

150118
<varlistentry>
151119
<term><replaceable class="parameter">alignment</replaceable></term>
@@ -259,13 +227,6 @@ CREATE TYPE
259227
length of this value of the type.
260228
</para>
261229

262-
<para>
263-
The external representation length is similarly specified using the
264-
<replaceable class="parameter">externallength</replaceable>
265-
keyword. (This value is not presently used, and is typically omitted,
266-
letting it default to <option>VARIABLE</option>.)
267-
</para>
268-
269230
<para>
270231
To indicate that a type is an array,
271232
specify the type of the array
@@ -292,18 +253,6 @@ CREATE TYPE
292253
clause attached to a particular column.)
293254
</para>
294255

295-
<para>
296-
The optional arguments
297-
<replaceable class="parameter">send_function</replaceable> and
298-
<replaceable class="parameter">receive_function</replaceable>
299-
are not currently used, and are usually omitted (allowing them
300-
to default to the
301-
<replaceable class="parameter">output_function</replaceable> and
302-
<replaceable class="parameter">input_function</replaceable>
303-
respectively). These functions may someday be resurrected for use
304-
in specifying machine-independent binary representations.
305-
</para>
306-
307256
<para>
308257
The optional flag, <option>PASSEDBYVALUE</option>, indicates that
309258
values of this data type are passed

src/backend/catalog/heap.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.212 2002/07/20 05:16:56 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.213 2002/07/24 19:11:07 petere Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -641,13 +641,10 @@ AddNewRelationType(const char *typeName,
641641
new_type_oid, /* preassigned oid for type */
642642
new_rel_oid, /* relation oid */
643643
sizeof(Oid), /* internal size */
644-
-1, /* external size */
645644
'c', /* type-type (complex) */
646645
',', /* default array delimiter */
647646
F_OIDIN, /* input procedure */
648647
F_OIDOUT, /* output procedure */
649-
F_OIDIN, /* receive procedure */
650-
F_OIDOUT, /* send procedure */
651648
InvalidOid, /* array element type - irrelevant */
652649
InvalidOid, /* domain base type - irrelevant */
653650
NULL, /* default type value - none */

src/backend/catalog/pg_aggregate.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.51 2002/07/18 23:11:27 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.52 2002/07/24 19:11:07 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -146,10 +146,6 @@ AggregateCreate(const char *aggName,
146146
false, /* security invoker (currently not definable for agg) */
147147
false, /* isStrict (not needed for agg) */
148148
PROVOLATILE_IMMUTABLE, /* volatility (not needed for agg) */
149-
BYTE_PCT, /* default cost values */
150-
PERBYTE_CPU,
151-
PERCALL_CPU,
152-
OUTIN_RATIO,
153149
1, /* parameterCount */
154150
fnArgs); /* parameterTypes */
155151

src/backend/catalog/pg_operator.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.73 2002/07/20 05:16:56 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.74 2002/07/24 19:11:08 petere Exp $
1212
*
1313
* NOTES
1414
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -232,9 +232,7 @@ OperatorShellMake(const char *operatorName,
232232
values[i++] = NameGetDatum(&oname); /* oprname */
233233
values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */
234234
values[i++] = Int32GetDatum(GetUserId()); /* oprowner */
235-
values[i++] = UInt16GetDatum(0); /* oprprec */
236235
values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */
237-
values[i++] = BoolGetDatum(false); /* oprisleft */
238236
values[i++] = BoolGetDatum(false); /* oprcanhash */
239237
values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */
240238
values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */
@@ -296,8 +294,6 @@ OperatorShellMake(const char *operatorName,
296294
* leftTypeId X left type ID
297295
* rightTypeId X right type ID
298296
* procedureName procedure for operator
299-
* precedence operator precedence
300-
* isLeftAssociative operator is left associative
301297
* commutatorName X commutator operator
302298
* negatorName X negator operator
303299
* restrictionName X restriction sel. procedure
@@ -331,9 +327,7 @@ OperatorShellMake(const char *operatorName,
331327
* assign values to the fields of the operator:
332328
* operatorName
333329
* owner id (simply the user id of the caller)
334-
* precedence
335330
* operator "kind" either "b" for binary or "l" for left unary
336-
* isLeftAssociative boolean
337331
* canHash boolean
338332
* leftTypeObjectId -- type must already be defined
339333
* rightTypeObjectId -- this is optional, enter ObjectId=0 if none specified
@@ -373,8 +367,6 @@ OperatorCreate(const char *operatorName,
373367
Oid leftTypeId,
374368
Oid rightTypeId,
375369
List *procedureName,
376-
uint16 precedence,
377-
bool isLeftAssociative,
378370
List *commutatorName,
379371
List *negatorName,
380372
List *restrictionName,
@@ -524,9 +516,7 @@ OperatorCreate(const char *operatorName,
524516
values[i++] = NameGetDatum(&oname); /* oprname */
525517
values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */
526518
values[i++] = Int32GetDatum(GetUserId()); /* oprowner */
527-
values[i++] = UInt16GetDatum(precedence); /* oprprec */
528519
values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */
529-
values[i++] = BoolGetDatum(isLeftAssociative); /* oprisleft */
530520
values[i++] = BoolGetDatum(canHash); /* oprcanhash */
531521
values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */
532522
values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */

0 commit comments

Comments
 (0)