Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef3b7cd

Browse files
committed
Add an implicit cast from varchar to regclass, so that existing code
of the form nextval('foo'::varchar) doesn't break. Per gripe from Jean-Pierre Pelletier. Initdb forced :-(
1 parent 5aad28a commit ef3b7cd

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.304 2005/10/06 02:29:18 tgl Exp $
40+
* $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.305 2005/10/21 15:45:06 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 200510051
56+
#define CATALOG_VERSION_NO 200510211
5757

5858
#endif

src/include/catalog/pg_cast.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* Copyright (c) 2002-2005, PostgreSQL Global Development Group
1212
*
13-
* $PostgreSQL: pgsql/src/include/catalog/pg_cast.h,v 1.23 2005/10/15 02:49:42 momjian Exp $
13+
* $PostgreSQL: pgsql/src/include/catalog/pg_cast.h,v 1.24 2005/10/21 15:45:06 tgl Exp $
1414
*
1515
* NOTES
1616
* the genbki.sh script reads this file and generates .bki
@@ -114,9 +114,9 @@ DATA(insert ( 16 23 2558 e ));
114114
* from OID to int4 or int8. Similarly for each OID-alias type. Also allow
115115
* implicit coercions between OID and each OID-alias type, as well as
116116
* regproc<->regprocedure and regoper<->regoperator. (Other coercions
117-
* between alias types must pass through OID.) Lastly, there is an implicit
118-
* cast from text to regclass, which exists mainly to support legacy forms
119-
* of nextval() and related functions.
117+
* between alias types must pass through OID.) Lastly, there are implicit
118+
* casts from text and varchar to regclass, which exist mainly to support
119+
* legacy forms of nextval() and related functions.
120120
*/
121121
DATA(insert ( 20 26 1287 i ));
122122
DATA(insert ( 21 26 313 i ));
@@ -170,6 +170,7 @@ DATA(insert ( 23 2206 0 i ));
170170
DATA(insert ( 2206 20 1288 a ));
171171
DATA(insert ( 2206 23 0 a ));
172172
DATA(insert ( 25 2205 1079 i ));
173+
DATA(insert ( 1043 2205 1079 i ));
173174

174175
/*
175176
* String category: this needs to be tightened up

0 commit comments

Comments
 (0)