Skip to content

Commit aab353a

Browse files
committed
Clean up some inconsistencies in the volatility marking of various I/O
related functions. Per today's discussion, we will henceforth assume that datatype I/O functions are either stable or immutable, never volatile. (This implies in particular that domain CHECK constraint expressions shouldn't be volatile, since domain_in executes them.) In turn, functions that execute the I/O functions of arbitrary datatypes should always be labeled stable. This affects the labeling of array_to_string, which was unsafely marked immutable, and record_in, record_out, record_recv, record_send, domain_in, domain_recv, which were over-conservatively marked volatile. The array I/O functions were already marked stable, which is correct per this policy but would have been wrong if we maintained domain_in as volatile. Back-patch to 9.0, along with an earlier fix to correctly mark cash_in and cash_out as stable not immutable (since they depend on lc_monetary). No catversion bump --- the implications of this are not currently severe enough to justify a forced initdb.
1 parent 66424a2 commit aab353a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/include/catalog/pg_proc.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.572 2010/07/16 02:15:54 tgl Exp $
10+
* $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.573 2010/07/29 20:09:25 tgl Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.pl reads this file and generates .bki
@@ -1020,7 +1020,7 @@ DATA(insert OID = 383 ( array_cat PGNSP PGUID 12 1 0 0 f f f f f i 2 0 2277
10201020
DESCR("concatenate two arrays");
10211021
DATA(insert OID = 394 ( string_to_array PGNSP PGUID 12 1 0 0 f f f t f i 2 0 1009 "25 25" _null_ _null_ _null_ _null_ text_to_array _null_ _null_ _null_ ));
10221022
DESCR("split delimited text into text[]");
1023-
DATA(insert OID = 395 ( array_to_string PGNSP PGUID 12 1 0 0 f f f t f i 2 0 25 "2277 25" _null_ _null_ _null_ _null_ array_to_text _null_ _null_ _null_ ));
1023+
DATA(insert OID = 395 ( array_to_string PGNSP PGUID 12 1 0 0 f f f t f s 2 0 25 "2277 25" _null_ _null_ _null_ _null_ array_to_text _null_ _null_ _null_ ));
10241024
DESCR("concatenate array elements, using delimiter, into text");
10251025
DATA(insert OID = 515 ( array_larger PGNSP PGUID 12 1 0 0 f f f t f i 2 0 2277 "2277 2277" _null_ _null_ _null_ _null_ array_larger _null_ _null_ _null_ ));
10261026
DESCR("larger of two");
@@ -3754,9 +3754,9 @@ DESCR("file path of relation");
37543754

37553755
DATA(insert OID = 2316 ( postgresql_fdw_validator PGNSP PGUID 12 1 0 0 f f f t f i 2 0 16 "1009 26" _null_ _null_ _null_ _null_ postgresql_fdw_validator _null_ _null_ _null_));
37563756

3757-
DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 1 0 0 f f f t f v 3 0 2249 "2275 26 23" _null_ _null_ _null_ _null_ record_in _null_ _null_ _null_ ));
3757+
DATA(insert OID = 2290 ( record_in PGNSP PGUID 12 1 0 0 f f f t f s 3 0 2249 "2275 26 23" _null_ _null_ _null_ _null_ record_in _null_ _null_ _null_ ));
37583758
DESCR("I/O");
3759-
DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 1 0 0 f f f t f v 1 0 2275 "2249" _null_ _null_ _null_ _null_ record_out _null_ _null_ _null_ ));
3759+
DATA(insert OID = 2291 ( record_out PGNSP PGUID 12 1 0 0 f f f t f s 1 0 2275 "2249" _null_ _null_ _null_ _null_ record_out _null_ _null_ _null_ ));
37603760
DESCR("I/O");
37613761
DATA(insert OID = 2292 ( cstring_in PGNSP PGUID 12 1 0 0 f f f t f i 1 0 2275 "2275" _null_ _null_ _null_ _null_ cstring_in _null_ _null_ _null_ ));
37623762
DESCR("I/O");
@@ -3798,9 +3798,9 @@ DATA(insert OID = 2398 ( shell_in PGNSP PGUID 12 1 0 0 f f f f f i 1 0 2282 "
37983798
DESCR("I/O");
37993799
DATA(insert OID = 2399 ( shell_out PGNSP PGUID 12 1 0 0 f f f t f i 1 0 2275 "2282" _null_ _null_ _null_ _null_ shell_out _null_ _null_ _null_ ));
38003800
DESCR("I/O");
3801-
DATA(insert OID = 2597 ( domain_in PGNSP PGUID 12 1 0 0 f f f f f v 3 0 2276 "2275 26 23" _null_ _null_ _null_ _null_ domain_in _null_ _null_ _null_ ));
3801+
DATA(insert OID = 2597 ( domain_in PGNSP PGUID 12 1 0 0 f f f f f s 3 0 2276 "2275 26 23" _null_ _null_ _null_ _null_ domain_in _null_ _null_ _null_ ));
38023802
DESCR("I/O");
3803-
DATA(insert OID = 2598 ( domain_recv PGNSP PGUID 12 1 0 0 f f f f f v 3 0 2276 "2281 26 23" _null_ _null_ _null_ _null_ domain_recv _null_ _null_ _null_ ));
3803+
DATA(insert OID = 2598 ( domain_recv PGNSP PGUID 12 1 0 0 f f f f f s 3 0 2276 "2281 26 23" _null_ _null_ _null_ _null_ domain_recv _null_ _null_ _null_ ));
38043804
DESCR("I/O");
38053805
DATA(insert OID = 2777 ( anynonarray_in PGNSP PGUID 12 1 0 0 f f f t f i 1 0 2776 "2275" _null_ _null_ _null_ _null_ anynonarray_in _null_ _null_ _null_ ));
38063806
DESCR("I/O");
@@ -3911,9 +3911,9 @@ DATA(insert OID = 2400 ( array_recv PGNSP PGUID 12 1 0 0 f f f t f s 3 0 22
39113911
DESCR("I/O");
39123912
DATA(insert OID = 2401 ( array_send PGNSP PGUID 12 1 0 0 f f f t f s 1 0 17 "2277" _null_ _null_ _null_ _null_ array_send _null_ _null_ _null_ ));
39133913
DESCR("I/O");
3914-
DATA(insert OID = 2402 ( record_recv PGNSP PGUID 12 1 0 0 f f f t f v 3 0 2249 "2281 26 23" _null_ _null_ _null_ _null_ record_recv _null_ _null_ _null_ ));
3914+
DATA(insert OID = 2402 ( record_recv PGNSP PGUID 12 1 0 0 f f f t f s 3 0 2249 "2281 26 23" _null_ _null_ _null_ _null_ record_recv _null_ _null_ _null_ ));
39153915
DESCR("I/O");
3916-
DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 1 0 0 f f f t f v 1 0 17 "2249" _null_ _null_ _null_ _null_ record_send _null_ _null_ _null_ ));
3916+
DATA(insert OID = 2403 ( record_send PGNSP PGUID 12 1 0 0 f f f t f s 1 0 17 "2249" _null_ _null_ _null_ _null_ record_send _null_ _null_ _null_ ));
39173917
DESCR("I/O");
39183918
DATA(insert OID = 2404 ( int2recv PGNSP PGUID 12 1 0 0 f f f t f i 1 0 21 "2281" _null_ _null_ _null_ _null_ int2recv _null_ _null_ _null_ ));
39193919
DESCR("I/O");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy