Skip to content

Commit a06c4f8

Browse files
committed
chore: update codegen sources
1 parent 00940fc commit a06c4f8

File tree

5 files changed

+334
-323
lines changed

5 files changed

+334
-323
lines changed

codegen/src/errcodes.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# errcodes.txt
33
# PostgreSQL error codes
44
#
5-
# Copyright (c) 2003-2022, PostgreSQL Global Development Group
5+
# Copyright (c) 2003-2024, PostgreSQL Global Development Group
66
#
77
# This list serves as the basis for generating source files containing error
88
# codes. It is kept in a common format to make sure all these source files have
@@ -252,6 +252,7 @@ Section: Class 25 - Invalid Transaction State
252252
25P01 E ERRCODE_NO_ACTIVE_SQL_TRANSACTION no_active_sql_transaction
253253
25P02 E ERRCODE_IN_FAILED_SQL_TRANSACTION in_failed_sql_transaction
254254
25P03 E ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT idle_in_transaction_session_timeout
255+
25P04 E ERRCODE_TRANSACTION_TIMEOUT transaction_timeout
255256

256257
Section: Class 26 - Invalid SQL Statement Name
257258

codegen/src/pg_range.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# pg_range.dat
44
# Initial contents of the pg_range system catalog.
55
#
6-
# Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
6+
# Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
77
# Portions Copyright (c) 1994, Regents of the University of California
88
#
99
# src/include/catalog/pg_range.dat

codegen/src/pg_type.dat

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# pg_type.dat
44
# Initial contents of the pg_type system catalog.
55
#
6-
# Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
6+
# Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
77
# Portions Copyright (c) 1994, Regents of the University of California
88
#
99
# src/include/catalog/pg_type.dat
@@ -32,7 +32,7 @@
3232
# OIDS 1 - 99
3333

3434
{ oid => '16', array_type_oid => '1000',
35-
descr => 'boolean, \'true\'/\'false\'',
35+
descr => 'boolean, format \'t\'/\'f\'',
3636
typname => 'bool', typlen => '1', typbyval => 't', typcategory => 'B',
3737
typispreferred => 't', typinput => 'boolin', typoutput => 'boolout',
3838
typreceive => 'boolrecv', typsend => 'boolsend', typalign => 'c' },
@@ -90,7 +90,7 @@
9090
typispreferred => 't', typinput => 'oidin', typoutput => 'oidout',
9191
typreceive => 'oidrecv', typsend => 'oidsend', typalign => 'i' },
9292
{ oid => '27', array_type_oid => '1010',
93-
descr => '(block, offset), physical location of tuple',
93+
descr => 'tuple physical location, format \'(block,offset)\'',
9494
typname => 'tid', typlen => '6', typbyval => 'f', typcategory => 'U',
9595
typinput => 'tidin', typoutput => 'tidout', typreceive => 'tidrecv',
9696
typsend => 'tidsend', typalign => 's' },
@@ -179,34 +179,35 @@
179179
# OIDS 600 - 699
180180

181181
{ oid => '600', array_type_oid => '1017',
182-
descr => 'geometric point \'(x, y)\'',
182+
descr => 'geometric point, format \'(x,y)\'',
183183
typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G',
184184
typsubscript => 'raw_array_subscript_handler', typelem => 'float8',
185185
typinput => 'point_in', typoutput => 'point_out', typreceive => 'point_recv',
186186
typsend => 'point_send', typalign => 'd' },
187187
{ oid => '601', array_type_oid => '1018',
188-
descr => 'geometric line segment \'(pt1,pt2)\'',
188+
descr => 'geometric line segment, format \'[point1,point2]\'',
189189
typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G',
190190
typsubscript => 'raw_array_subscript_handler', typelem => 'point',
191191
typinput => 'lseg_in', typoutput => 'lseg_out', typreceive => 'lseg_recv',
192192
typsend => 'lseg_send', typalign => 'd' },
193193
{ oid => '602', array_type_oid => '1019',
194-
descr => 'geometric path \'(pt1,...)\'',
194+
descr => 'geometric path, format \'(point1,...)\'',
195195
typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G',
196196
typinput => 'path_in', typoutput => 'path_out', typreceive => 'path_recv',
197197
typsend => 'path_send', typalign => 'd', typstorage => 'x' },
198198
{ oid => '603', array_type_oid => '1020',
199-
descr => 'geometric box \'(lower left,upper right)\'',
199+
descr => 'geometric box, format \'lower left point,upper right point\'',
200200
typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G',
201201
typdelim => ';', typsubscript => 'raw_array_subscript_handler',
202202
typelem => 'point', typinput => 'box_in', typoutput => 'box_out',
203203
typreceive => 'box_recv', typsend => 'box_send', typalign => 'd' },
204204
{ oid => '604', array_type_oid => '1027',
205-
descr => 'geometric polygon \'(pt1,...)\'',
205+
descr => 'geometric polygon, format \'(point1,...)\'',
206206
typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G',
207207
typinput => 'poly_in', typoutput => 'poly_out', typreceive => 'poly_recv',
208208
typsend => 'poly_send', typalign => 'd', typstorage => 'x' },
209-
{ oid => '628', array_type_oid => '629', descr => 'geometric line',
209+
{ oid => '628', array_type_oid => '629',
210+
descr => 'geometric line, formats \'{A,B,C}\'/\'[point1,point2]\'',
210211
typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G',
211212
typsubscript => 'raw_array_subscript_handler', typelem => 'float8',
212213
typinput => 'line_in', typoutput => 'line_out', typreceive => 'line_recv',
@@ -230,7 +231,7 @@
230231
typcategory => 'X', typinput => 'unknownin', typoutput => 'unknownout',
231232
typreceive => 'unknownrecv', typsend => 'unknownsend', typalign => 'c' },
232233
{ oid => '718', array_type_oid => '719',
233-
descr => 'geometric circle \'(center,radius)\'',
234+
descr => 'geometric circle, format \'<center point,radius>\'',
234235
typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G',
235236
typinput => 'circle_in', typoutput => 'circle_out',
236237
typreceive => 'circle_recv', typsend => 'circle_send', typalign => 'd' },
@@ -267,18 +268,18 @@
267268
# OIDS 1000 - 1099
268269

269270
{ oid => '1033', array_type_oid => '1034', descr => 'access control list',
270-
typname => 'aclitem', typlen => '12', typbyval => 'f', typcategory => 'U',
271+
typname => 'aclitem', typlen => '16', typbyval => 'f', typcategory => 'U',
271272
typinput => 'aclitemin', typoutput => 'aclitemout', typreceive => '-',
272-
typsend => '-', typalign => 'i' },
273+
typsend => '-', typalign => 'd' },
273274
{ oid => '1042', array_type_oid => '1014',
274-
descr => 'char(length), blank-padded string, fixed storage length',
275+
descr => '\'char(length)\' blank-padded string, fixed storage length',
275276
typname => 'bpchar', typlen => '-1', typbyval => 'f', typcategory => 'S',
276277
typinput => 'bpcharin', typoutput => 'bpcharout', typreceive => 'bpcharrecv',
277278
typsend => 'bpcharsend', typmodin => 'bpchartypmodin',
278279
typmodout => 'bpchartypmodout', typalign => 'i', typstorage => 'x',
279280
typcollation => 'default' },
280281
{ oid => '1043', array_type_oid => '1015',
281-
descr => 'varchar(length), non-blank-padded string, variable storage length',
282+
descr => '\'varchar(length)\' non-blank-padded string, variable storage length',
282283
typname => 'varchar', typlen => '-1', typbyval => 'f', typcategory => 'S',
283284
typinput => 'varcharin', typoutput => 'varcharout',
284285
typreceive => 'varcharrecv', typsend => 'varcharsend',
@@ -310,7 +311,7 @@
310311
typsend => 'timestamptz_send', typmodin => 'timestamptztypmodin',
311312
typmodout => 'timestamptztypmodout', typalign => 'd' },
312313
{ oid => '1186', array_type_oid => '1187',
313-
descr => '@ <number> <units>, time interval',
314+
descr => 'time interval, format \'number units ...\'',
314315
typname => 'interval', typlen => '16', typbyval => 'f', typcategory => 'T',
315316
typispreferred => 't', typinput => 'interval_in', typoutput => 'interval_out',
316317
typreceive => 'interval_recv', typsend => 'interval_send',
@@ -345,7 +346,7 @@
345346
# OIDS 1700 - 1799
346347

347348
{ oid => '1700', array_type_oid => '1231',
348-
descr => 'numeric(precision, decimal), arbitrary precision number',
349+
descr => '\'numeric(precision, scale)\' arbitrary precision number',
349350
typname => 'numeric', typlen => '-1', typbyval => 'f', typcategory => 'N',
350351
typinput => 'numeric_in', typoutput => 'numeric_out',
351352
typreceive => 'numeric_recv', typsend => 'numeric_send',
@@ -400,13 +401,13 @@
400401
typalign => 'i' },
401402

402403
# uuid
403-
{ oid => '2950', array_type_oid => '2951', descr => 'UUID datatype',
404+
{ oid => '2950', array_type_oid => '2951', descr => 'UUID',
404405
typname => 'uuid', typlen => '16', typbyval => 'f', typcategory => 'U',
405406
typinput => 'uuid_in', typoutput => 'uuid_out', typreceive => 'uuid_recv',
406407
typsend => 'uuid_send', typalign => 'c' },
407408

408409
# pg_lsn
409-
{ oid => '3220', array_type_oid => '3221', descr => 'PostgreSQL LSN datatype',
410+
{ oid => '3220', array_type_oid => '3221', descr => 'PostgreSQL LSN',
410411
typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
411412
typcategory => 'U', typinput => 'pg_lsn_in', typoutput => 'pg_lsn_out',
412413
typreceive => 'pg_lsn_recv', typsend => 'pg_lsn_send', typalign => 'd' },
@@ -452,12 +453,12 @@
452453
typreceive => 'jsonpath_recv', typsend => 'jsonpath_send', typalign => 'i',
453454
typstorage => 'x' },
454455

455-
{ oid => '2970', array_type_oid => '2949', descr => 'txid snapshot',
456+
{ oid => '2970', array_type_oid => '2949', descr => 'transaction snapshot',
456457
typname => 'txid_snapshot', typlen => '-1', typbyval => 'f',
457458
typcategory => 'U', typinput => 'txid_snapshot_in',
458459
typoutput => 'txid_snapshot_out', typreceive => 'txid_snapshot_recv',
459460
typsend => 'txid_snapshot_send', typalign => 'd', typstorage => 'x' },
460-
{ oid => '5038', array_type_oid => '5039', descr => 'snapshot',
461+
{ oid => '5038', array_type_oid => '5039', descr => 'transaction snapshot',
461462
typname => 'pg_snapshot', typlen => '-1', typbyval => 'f', typcategory => 'U',
462463
typinput => 'pg_snapshot_in', typoutput => 'pg_snapshot_out',
463464
typreceive => 'pg_snapshot_recv', typsend => 'pg_snapshot_send',
@@ -633,6 +634,7 @@
633634
typoutput => 'tsm_handler_out', typreceive => '-', typsend => '-',
634635
typalign => 'i' },
635636
{ oid => '269',
637+
descr => 'pseudo-type for the result of a table AM handler function',
636638
typname => 'table_am_handler', typlen => '4', typbyval => 't', typtype => 'p',
637639
typcategory => 'P', typinput => 'table_am_handler_in',
638640
typoutput => 'table_am_handler_out', typreceive => '-', typsend => '-',
@@ -679,13 +681,14 @@
679681
typtype => 'p', typcategory => 'P', typinput => 'anycompatiblemultirange_in',
680682
typoutput => 'anycompatiblemultirange_out', typreceive => '-', typsend => '-',
681683
typalign => 'd', typstorage => 'x' },
682-
{ oid => '4600', descr => 'BRIN bloom summary',
684+
{ oid => '4600', descr => 'pseudo-type representing BRIN bloom summary',
683685
typname => 'pg_brin_bloom_summary', typlen => '-1', typbyval => 'f',
684686
typcategory => 'Z', typinput => 'brin_bloom_summary_in',
685687
typoutput => 'brin_bloom_summary_out',
686688
typreceive => 'brin_bloom_summary_recv', typsend => 'brin_bloom_summary_send',
687689
typalign => 'i', typstorage => 'x', typcollation => 'default' },
688-
{ oid => '4601', descr => 'BRIN minmax-multi summary',
690+
{ oid => '4601',
691+
descr => 'pseudo-type representing BRIN minmax-multi summary',
689692
typname => 'pg_brin_minmax_multi_summary', typlen => '-1', typbyval => 'f',
690693
typcategory => 'Z', typinput => 'brin_minmax_multi_summary_in',
691694
typoutput => 'brin_minmax_multi_summary_out',

postgres-types/src/type_gen.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ impl Inner {
967967
}
968968
}
969969
impl Type {
970-
/// BOOL - boolean, &#39;true&#39;/&#39;false&#39;
970+
/// BOOL - boolean, format &#39;t&#39;/&#39;f&#39;
971971
pub const BOOL: Type = Type(Inner::Bool);
972972

973973
/// BYTEA - variable-length string, binary values escaped
@@ -1000,7 +1000,7 @@ impl Type {
10001000
/// OID - object identifier&#40;oid&#41;, maximum 4 billion
10011001
pub const OID: Type = Type(Inner::Oid);
10021002

1003-
/// TID - &#40;block, offset&#41;, physical location of tuple
1003+
/// TID - tuple physical location, format &#39;&#40;block,offset&#41;&#39;
10041004
pub const TID: Type = Type(Inner::Tid);
10051005

10061006
/// XID - transaction id
@@ -1030,7 +1030,7 @@ impl Type {
10301030
/// JSON&#91;&#93;
10311031
pub const JSON_ARRAY: Type = Type(Inner::JsonArray);
10321032

1033-
/// TABLE_AM_HANDLER
1033+
/// TABLE_AM_HANDLER - pseudo-type for the result of a table AM handler function
10341034
pub const TABLE_AM_HANDLER: Type = Type(Inner::TableAmHandler);
10351035

10361036
/// XID8&#91;&#93;
@@ -1039,22 +1039,22 @@ impl Type {
10391039
/// INDEX_AM_HANDLER - pseudo-type for the result of an index AM handler function
10401040
pub const INDEX_AM_HANDLER: Type = Type(Inner::IndexAmHandler);
10411041

1042-
/// POINT - geometric point &#39;&#40;x, y&#41;&#39;
1042+
/// POINT - geometric point, format &#39;&#40;x,y&#41;&#39;
10431043
pub const POINT: Type = Type(Inner::Point);
10441044

1045-
/// LSEG - geometric line segment &#39;&#40;pt1,pt2&#41;&#39;
1045+
/// LSEG - geometric line segment, format &#39;&#91;point1,point2&#93;&#39;
10461046
pub const LSEG: Type = Type(Inner::Lseg);
10471047

1048-
/// PATH - geometric path &#39;&#40;pt1,...&#41;&#39;
1048+
/// PATH - geometric path, format &#39;&#40;point1,...&#41;&#39;
10491049
pub const PATH: Type = Type(Inner::Path);
10501050

1051-
/// BOX - geometric box &#39;&#40;lower left,upper right&#41;&#39;
1051+
/// BOX - geometric box, format &#39;lower left point,upper right point&#39;
10521052
pub const BOX: Type = Type(Inner::Box);
10531053

1054-
/// POLYGON - geometric polygon &#39;&#40;pt1,...&#41;&#39;
1054+
/// POLYGON - geometric polygon, format &#39;&#40;point1,...&#41;&#39;
10551055
pub const POLYGON: Type = Type(Inner::Polygon);
10561056

1057-
/// LINE - geometric line
1057+
/// LINE - geometric line, formats &#39;&#123;A,B,C&#125;&#39;/&#39;&#91;point1,point2&#93;&#39;
10581058
pub const LINE: Type = Type(Inner::Line);
10591059

10601060
/// LINE&#91;&#93;
@@ -1075,7 +1075,7 @@ impl Type {
10751075
/// UNKNOWN - pseudo-type representing an undetermined type
10761076
pub const UNKNOWN: Type = Type(Inner::Unknown);
10771077

1078-
/// CIRCLE - geometric circle &#39;&#40;center,radius&#41;&#39;
1078+
/// CIRCLE - geometric circle, format &#39;&lt;center point,radius&gt;&#39;
10791079
pub const CIRCLE: Type = Type(Inner::Circle);
10801080

10811081
/// CIRCLE&#91;&#93;
@@ -1183,10 +1183,10 @@ impl Type {
11831183
/// INET&#91;&#93;
11841184
pub const INET_ARRAY: Type = Type(Inner::InetArray);
11851185

1186-
/// BPCHAR - char&#40;length&#41;, blank-padded string, fixed storage length
1186+
/// BPCHAR - &#39;char&#40;length&#41;&#39; blank-padded string, fixed storage length
11871187
pub const BPCHAR: Type = Type(Inner::Bpchar);
11881188

1189-
/// VARCHAR - varchar&#40;length&#41;, non-blank-padded string, variable storage length
1189+
/// VARCHAR - &#39;varchar&#40;length&#41;&#39; non-blank-padded string, variable storage length
11901190
pub const VARCHAR: Type = Type(Inner::Varchar);
11911191

11921192
/// DATE - date
@@ -1213,7 +1213,7 @@ impl Type {
12131213
/// TIMESTAMPTZ&#91;&#93;
12141214
pub const TIMESTAMPTZ_ARRAY: Type = Type(Inner::TimestamptzArray);
12151215

1216-
/// INTERVAL - &#64; &lt;number&gt; &lt;units&gt;, time interval
1216+
/// INTERVAL - time interval, format &#39;number units ...&#39;
12171217
pub const INTERVAL: Type = Type(Inner::Interval);
12181218

12191219
/// INTERVAL&#91;&#93;
@@ -1243,7 +1243,7 @@ impl Type {
12431243
/// VARBIT&#91;&#93;
12441244
pub const VARBIT_ARRAY: Type = Type(Inner::VarbitArray);
12451245

1246-
/// NUMERIC - numeric&#40;precision, decimal&#41;, arbitrary precision number
1246+
/// NUMERIC - &#39;numeric&#40;precision, scale&#41;&#39; arbitrary precision number
12471247
pub const NUMERIC: Type = Type(Inner::Numeric);
12481248

12491249
/// REFCURSOR - reference to cursor &#40;portal name&#41;
@@ -1318,19 +1318,19 @@ impl Type {
13181318
/// TXID_SNAPSHOT&#91;&#93;
13191319
pub const TXID_SNAPSHOT_ARRAY: Type = Type(Inner::TxidSnapshotArray);
13201320

1321-
/// UUID - UUID datatype
1321+
/// UUID - UUID
13221322
pub const UUID: Type = Type(Inner::Uuid);
13231323

13241324
/// UUID&#91;&#93;
13251325
pub const UUID_ARRAY: Type = Type(Inner::UuidArray);
13261326

1327-
/// TXID_SNAPSHOT - txid snapshot
1327+
/// TXID_SNAPSHOT - transaction snapshot
13281328
pub const TXID_SNAPSHOT: Type = Type(Inner::TxidSnapshot);
13291329

13301330
/// FDW_HANDLER - pseudo-type for the result of an FDW handler function
13311331
pub const FDW_HANDLER: Type = Type(Inner::FdwHandler);
13321332

1333-
/// PG_LSN - PostgreSQL LSN datatype
1333+
/// PG_LSN - PostgreSQL LSN
13341334
pub const PG_LSN: Type = Type(Inner::PgLsn);
13351335

13361336
/// PG_LSN&#91;&#93;
@@ -1474,16 +1474,16 @@ impl Type {
14741474
/// ANYCOMPATIBLEMULTIRANGE - pseudo-type representing a multirange over a polymorphic common type
14751475
pub const ANYCOMPATIBLEMULTI_RANGE: Type = Type(Inner::AnycompatiblemultiRange);
14761476

1477-
/// PG_BRIN_BLOOM_SUMMARY - BRIN bloom summary
1477+
/// PG_BRIN_BLOOM_SUMMARY - pseudo-type representing BRIN bloom summary
14781478
pub const PG_BRIN_BLOOM_SUMMARY: Type = Type(Inner::PgBrinBloomSummary);
14791479

1480-
/// PG_BRIN_MINMAX_MULTI_SUMMARY - BRIN minmax-multi summary
1480+
/// PG_BRIN_MINMAX_MULTI_SUMMARY - pseudo-type representing BRIN minmax-multi summary
14811481
pub const PG_BRIN_MINMAX_MULTI_SUMMARY: Type = Type(Inner::PgBrinMinmaxMultiSummary);
14821482

14831483
/// PG_MCV_LIST - multivariate MCV list
14841484
pub const PG_MCV_LIST: Type = Type(Inner::PgMcvList);
14851485

1486-
/// PG_SNAPSHOT - snapshot
1486+
/// PG_SNAPSHOT - transaction snapshot
14871487
pub const PG_SNAPSHOT: Type = Type(Inner::PgSnapshot);
14881488

14891489
/// PG_SNAPSHOT&#91;&#93;

0 commit comments

Comments
 (0)