1
/*-------------------------------------------------------------------------
4
* definition of the system "type" relation (pg_type)
5
* along with the relation's initial contents.
8
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
9
* Portions Copyright (c) 1994, Regents of the University of California
11
* $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.158 2004-12-31 22:03:26 pgsql Exp $
14
* the genbki.sh script reads this file and generates .bki
15
* information from the DATA() statements.
17
*-------------------------------------------------------------------------
22
#include "nodes/nodes.h"
25
* postgres.h contains the system type definitions and the
26
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
27
* can be read by both genbki.sh and the C compiler.
32
* pg_type definition. cpp turns this into
33
* typedef struct FormData_pg_type
35
* Some of the values in a pg_type instance are copied into
36
* pg_attribute instances. Some parts of Postgres use the pg_type copy,
37
* while others use the pg_attribute copy, so they must match.
38
* See struct FormData_pg_attribute for details.
41
CATALOG(pg_type) BOOTSTRAP
43
NameData typname; /* type name */
44
Oid typnamespace; /* OID of namespace containing this type */
45
int4 typowner; /* type owner */
48
* For a fixed-size type, typlen is the number of bytes we use to
49
* represent a value of this type, e.g. 4 for an int4. But for a
50
* variable-length type, typlen is negative. We use -1 to indicate a
51
* "varlena" type (one that has a length word), -2 to indicate a
52
* null-terminated C string.
57
* typbyval determines whether internal Postgres routines pass a value
58
* of this type by value or by reference. typbyval had better be
59
* FALSE if the length is not 1, 2, or 4 (or 8 on 8-byte-Datum
60
* machines). Variable-length types are always passed by reference.
61
* Note that typbyval can be false even if the length would allow
62
* pass-by-value; this is currently true for type float4, for example.
67
* typtype is 'b' for a basic type, 'c' for a complex type (ie a
68
* table's rowtype), 'd' for a domain type, or 'p' for a pseudo type.
70
* If typtype is 'c', typrelid is the OID of the class' entry in
76
* If typisdefined is false, the entry is only a placeholder (forward
77
* reference). We know the type name, but not yet anything else about
82
char typdelim; /* delimiter for arrays of this type */
84
Oid typrelid; /* 0 if not a complex type */
87
* If typelem is not 0 then it identifies another row in pg_type. The
88
* current type can then be subscripted like an array yielding values
89
* of type typelem. A non-zero typelem does not guarantee this type to
90
* be a "real" array type; some ordinary fixed-length types can also
91
* be subscripted (e.g., oidvector). Variable-length types can *not*
92
* be turned into pseudo-arrays like that. Hence, the way to determine
93
* whether a type is a "true" array type is if:
95
* typelem != 0 and typlen == -1.
100
* I/O conversion procedures for the datatype.
102
regproc typinput; /* text format (required) */
104
regproc typreceive; /* binary format (optional) */
108
* Custom ANALYZE procedure for the datatype (0 selects the default).
113
* typalign is the alignment required when storing a value of this
114
* type. It applies to storage on disk as well as most
115
* representations of the value inside Postgres. When multiple values
116
* are stored consecutively, such as in the representation of a
117
* complete row on disk, padding is inserted before a datum of this
118
* type so that it begins on the specified boundary. The alignment
119
* reference is the beginning of the first datum in the sequence.
121
* 'c' = CHAR alignment, ie no alignment needed.
122
* 's' = SHORT alignment (2 bytes on most machines).
123
* 'i' = INT alignment (4 bytes on most machines).
124
* 'd' = DOUBLE alignment (8 bytes on many machines, but by no means all).
126
* See include/utils/memutils.h for the macros that compute these
127
* alignment requirements.
129
* NOTE: for types used in system tables, it is critical that the
130
* size and alignment defined in pg_type agree with the way that the
131
* compiler will lay out the field in a struct representing a table row.
137
* typstorage tells if the type is prepared for toasting and what
138
* the default strategy for attributes of this type should be.
140
* 'p' PLAIN type not prepared for toasting
141
* 'e' EXTERNAL external storage possible, don't try to compress
142
* 'x' EXTENDED try to compress and store external if required
143
* 'm' MAIN like 'x' but try to keep in main tuple
149
* This flag represents a "NOT NULL" constraint against this datatype.
151
* If true, the attnotnull column for a corresponding table column using
152
* this datatype will always enforce the NOT NULL constraint.
154
* Used primarily for domain types.
159
* Domains use typbasetype to show the base (or complex) type that the
160
* domain is based on. Zero if the type is not a domain.
165
* Domains use typtypmod to record the typmod to be applied to their
166
* base type (-1 if base type does not use a typmod). -1 if this type
172
* typndims is the declared number of dimensions for an array domain
173
* type (i.e., typbasetype is an array type; the domain's typelem will
174
* match the base type's typelem). Otherwise zero.
179
* If typdefaultbin is not NULL, it is the nodeToString representation
180
* of a default expression for the type. Currently this is only used
183
text typdefaultbin; /* VARIABLE LENGTH FIELD */
186
* typdefault is NULL if the type has no associated default value. If
187
* typdefaultbin is not NULL, typdefault must contain a human-readable
188
* version of the default expression represented by typdefaultbin. If
189
* typdefaultbin is NULL and typdefault is not, then typdefault is the
190
* external representation of the type's default value, which may be
191
* fed to the type's input converter to produce a constant.
193
text typdefault; /* VARIABLE LENGTH FIELD */
198
* Form_pg_type corresponds to a pointer to a row with
199
* the format of pg_type relation.
202
typedef FormData_pg_type *Form_pg_type;
205
* compiler constants for pg_type
208
#define Natts_pg_type 23
209
#define Anum_pg_type_typname 1
210
#define Anum_pg_type_typnamespace 2
211
#define Anum_pg_type_typowner 3
212
#define Anum_pg_type_typlen 4
213
#define Anum_pg_type_typbyval 5
214
#define Anum_pg_type_typtype 6
215
#define Anum_pg_type_typisdefined 7
216
#define Anum_pg_type_typdelim 8
217
#define Anum_pg_type_typrelid 9
218
#define Anum_pg_type_typelem 10
219
#define Anum_pg_type_typinput 11
220
#define Anum_pg_type_typoutput 12
221
#define Anum_pg_type_typreceive 13
222
#define Anum_pg_type_typsend 14
223
#define Anum_pg_type_typanalyze 15
224
#define Anum_pg_type_typalign 16
225
#define Anum_pg_type_typstorage 17
226
#define Anum_pg_type_typnotnull 18
227
#define Anum_pg_type_typbasetype 19
228
#define Anum_pg_type_typtypmod 20
229
#define Anum_pg_type_typndims 21
230
#define Anum_pg_type_typdefaultbin 22
231
#define Anum_pg_type_typdefault 23
235
* initial contents of pg_type
239
/* keep the following ordered by OID so that later changes can be made easier*/
241
/* Make sure the typlen, typbyval, and typalign values here match the initial
242
values for attlen, attbyval, and attalign in both places in pg_attribute.h
247
DATA(insert OID = 16 ( bool PGNSP PGUID 1 t b t \054 0 0 boolin boolout boolrecv boolsend - c p f 0 -1 0 _null_ _null_ ));
248
DESCR("boolean, 'true'/'false'");
251
DATA(insert OID = 17 ( bytea PGNSP PGUID -1 f b t \054 0 0 byteain byteaout bytearecv byteasend - i x f 0 -1 0 _null_ _null_ ));
252
DESCR("variable-length string, binary values escaped");
255
DATA(insert OID = 18 ( char PGNSP PGUID 1 t b t \054 0 0 charin charout charrecv charsend - c p f 0 -1 0 _null_ _null_ ));
256
DESCR("single character");
259
DATA(insert OID = 19 ( name PGNSP PGUID NAMEDATALEN f b t \054 0 18 namein nameout namerecv namesend - i p f 0 -1 0 _null_ _null_ ));
260
DESCR("63-character type for storing system identifiers");
263
DATA(insert OID = 20 ( int8 PGNSP PGUID 8 f b t \054 0 0 int8in int8out int8recv int8send - d p f 0 -1 0 _null_ _null_ ));
264
DESCR("~18 digit integer, 8-byte storage");
267
DATA(insert OID = 21 ( int2 PGNSP PGUID 2 t b t \054 0 0 int2in int2out int2recv int2send - s p f 0 -1 0 _null_ _null_ ));
268
DESCR("-32 thousand to 32 thousand, 2-byte storage");
271
DATA(insert OID = 22 ( int2vector PGNSP PGUID INDEX_MAX_KEYS*2 f b t \054 0 21 int2vectorin int2vectorout int2vectorrecv int2vectorsend - s p f 0 -1 0 _null_ _null_ ));
272
DESCR("array of INDEX_MAX_KEYS int2 integers, used in system tables");
273
#define INT2VECTOROID 22
275
DATA(insert OID = 23 ( int4 PGNSP PGUID 4 t b t \054 0 0 int4in int4out int4recv int4send - i p f 0 -1 0 _null_ _null_ ));
276
DESCR("-2 billion to 2 billion integer, 4-byte storage");
279
DATA(insert OID = 24 ( regproc PGNSP PGUID 4 t b t \054 0 0 regprocin regprocout regprocrecv regprocsend - i p f 0 -1 0 _null_ _null_ ));
280
DESCR("registered procedure");
281
#define REGPROCOID 24
283
DATA(insert OID = 25 ( text PGNSP PGUID -1 f b t \054 0 0 textin textout textrecv textsend - i x f 0 -1 0 _null_ _null_ ));
284
DESCR("variable-length string, no limit specified");
287
DATA(insert OID = 26 ( oid PGNSP PGUID 4 t b t \054 0 0 oidin oidout oidrecv oidsend - i p f 0 -1 0 _null_ _null_ ));
288
DESCR("object identifier(oid), maximum 4 billion");
291
DATA(insert OID = 27 ( tid PGNSP PGUID 6 f b t \054 0 0 tidin tidout tidrecv tidsend - s p f 0 -1 0 _null_ _null_ ));
292
DESCR("(Block, offset), physical location of tuple");
295
DATA(insert OID = 28 ( xid PGNSP PGUID 4 t b t \054 0 0 xidin xidout xidrecv xidsend - i p f 0 -1 0 _null_ _null_ ));
296
DESCR("transaction id");
299
DATA(insert OID = 29 ( cid PGNSP PGUID 4 t b t \054 0 0 cidin cidout cidrecv cidsend - i p f 0 -1 0 _null_ _null_ ));
300
DESCR("command identifier type, sequence in transaction id");
303
DATA(insert OID = 30 ( oidvector PGNSP PGUID INDEX_MAX_KEYS*4 f b t \054 0 26 oidvectorin oidvectorout oidvectorrecv oidvectorsend - i p f 0 -1 0 _null_ _null_ ));
304
DESCR("array of INDEX_MAX_KEYS oids, used in system tables");
305
#define OIDVECTOROID 30
307
DATA(insert OID = 71 ( pg_type PGNSP PGUID -1 f c t \054 1247 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
308
#define PG_TYPE_RELTYPE_OID 71
309
DATA(insert OID = 75 ( pg_attribute PGNSP PGUID -1 f c t \054 1249 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
310
#define PG_ATTRIBUTE_RELTYPE_OID 75
311
DATA(insert OID = 81 ( pg_proc PGNSP PGUID -1 f c t \054 1255 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
312
#define PG_PROC_RELTYPE_OID 81
313
DATA(insert OID = 83 ( pg_class PGNSP PGUID -1 f c t \054 1259 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
314
#define PG_CLASS_RELTYPE_OID 83
315
DATA(insert OID = 86 ( pg_shadow PGNSP PGUID -1 f c t \054 1260 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
316
DATA(insert OID = 87 ( pg_group PGNSP PGUID -1 f c t \054 1261 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
317
DATA(insert OID = 88 ( pg_database PGNSP PGUID -1 f c t \054 1262 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
318
DATA(insert OID = 90 ( pg_tablespace PGNSP PGUID -1 f c t \054 1213 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
324
DATA(insert OID = 210 ( smgr PGNSP PGUID 2 t b t \054 0 0 smgrin smgrout - - - s p f 0 -1 0 _null_ _null_ ));
325
DESCR("storage manager");
334
DATA(insert OID = 600 ( point PGNSP PGUID 16 f b t \054 0 701 point_in point_out point_recv point_send - d p f 0 -1 0 _null_ _null_ ));
335
DESCR("geometric point '(x, y)'");
337
DATA(insert OID = 601 ( lseg PGNSP PGUID 32 f b t \054 0 600 lseg_in lseg_out lseg_recv lseg_send - d p f 0 -1 0 _null_ _null_ ));
338
DESCR("geometric line segment '(pt1,pt2)'");
340
DATA(insert OID = 602 ( path PGNSP PGUID -1 f b t \054 0 0 path_in path_out path_recv path_send - d x f 0 -1 0 _null_ _null_ ));
341
DESCR("geometric path '(pt1,...)'");
343
DATA(insert OID = 603 ( box PGNSP PGUID 32 f b t \073 0 600 box_in box_out box_recv box_send - d p f 0 -1 0 _null_ _null_ ));
344
DESCR("geometric box '(lower left,upper right)'");
346
DATA(insert OID = 604 ( polygon PGNSP PGUID -1 f b t \054 0 0 poly_in poly_out poly_recv poly_send - d x f 0 -1 0 _null_ _null_ ));
347
DESCR("geometric polygon '(pt1,...)'");
348
#define POLYGONOID 604
350
DATA(insert OID = 628 ( line PGNSP PGUID 32 f b t \054 0 701 line_in line_out line_recv line_send - d p f 0 -1 0 _null_ _null_ ));
351
DESCR("geometric line (not implemented)'");
353
DATA(insert OID = 629 ( _line PGNSP PGUID -1 f b t \054 0 628 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
358
DATA(insert OID = 700 ( float4 PGNSP PGUID 4 f b t \054 0 0 float4in float4out float4recv float4send - i p f 0 -1 0 _null_ _null_ ));
359
DESCR("single-precision floating point number, 4-byte storage");
360
#define FLOAT4OID 700
361
DATA(insert OID = 701 ( float8 PGNSP PGUID 8 f b t \054 0 0 float8in float8out float8recv float8send - d p f 0 -1 0 _null_ _null_ ));
362
DESCR("double-precision floating point number, 8-byte storage");
363
#define FLOAT8OID 701
364
DATA(insert OID = 702 ( abstime PGNSP PGUID 4 t b t \054 0 0 abstimein abstimeout abstimerecv abstimesend - i p f 0 -1 0 _null_ _null_ ));
365
DESCR("absolute, limited-range date and time (Unix system time)");
366
#define ABSTIMEOID 702
367
DATA(insert OID = 703 ( reltime PGNSP PGUID 4 t b t \054 0 0 reltimein reltimeout reltimerecv reltimesend - i p f 0 -1 0 _null_ _null_ ));
368
DESCR("relative, limited-range time interval (Unix delta time)");
369
#define RELTIMEOID 703
370
DATA(insert OID = 704 ( tinterval PGNSP PGUID 12 f b t \054 0 0 tintervalin tintervalout tintervalrecv tintervalsend - i p f 0 -1 0 _null_ _null_ ));
371
DESCR("(abstime,abstime), time interval");
372
#define TINTERVALOID 704
373
DATA(insert OID = 705 ( unknown PGNSP PGUID -1 f b t \054 0 0 unknownin unknownout unknownrecv unknownsend - i p f 0 -1 0 _null_ _null_ ));
375
#define UNKNOWNOID 705
377
DATA(insert OID = 718 ( circle PGNSP PGUID 24 f b t \054 0 0 circle_in circle_out circle_recv circle_send - d p f 0 -1 0 _null_ _null_ ));
378
DESCR("geometric circle '(center,radius)'");
379
#define CIRCLEOID 718
380
DATA(insert OID = 719 ( _circle PGNSP PGUID -1 f b t \054 0 718 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
381
DATA(insert OID = 790 ( money PGNSP PGUID 4 f b t \054 0 0 cash_in cash_out cash_recv cash_send - i p f 0 -1 0 _null_ _null_ ));
382
DESCR("monetary amounts, $d,ddd.cc");
384
DATA(insert OID = 791 ( _money PGNSP PGUID -1 f b t \054 0 790 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
387
DATA(insert OID = 829 ( macaddr PGNSP PGUID 6 f b t \054 0 0 macaddr_in macaddr_out macaddr_recv macaddr_send - i p f 0 -1 0 _null_ _null_ ));
388
DESCR("XX:XX:XX:XX:XX:XX, MAC address");
389
#define MACADDROID 829
390
DATA(insert OID = 869 ( inet PGNSP PGUID -1 f b t \054 0 0 inet_in inet_out inet_recv inet_send - i p f 0 -1 0 _null_ _null_ ));
391
DESCR("IP address/netmask, host address, netmask optional");
393
DATA(insert OID = 650 ( cidr PGNSP PGUID -1 f b t \054 0 0 cidr_in cidr_out cidr_recv cidr_send - i p f 0 -1 0 _null_ _null_ ));
394
DESCR("network IP address/netmask, network address");
399
/* OIDS 1000 - 1099 */
400
DATA(insert OID = 1000 ( _bool PGNSP PGUID -1 f b t \054 0 16 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
401
DATA(insert OID = 1001 ( _bytea PGNSP PGUID -1 f b t \054 0 17 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
402
DATA(insert OID = 1002 ( _char PGNSP PGUID -1 f b t \054 0 18 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
403
DATA(insert OID = 1003 ( _name PGNSP PGUID -1 f b t \054 0 19 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
404
DATA(insert OID = 1005 ( _int2 PGNSP PGUID -1 f b t \054 0 21 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
405
DATA(insert OID = 1006 ( _int2vector PGNSP PGUID -1 f b t \054 0 22 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
406
DATA(insert OID = 1007 ( _int4 PGNSP PGUID -1 f b t \054 0 23 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
407
#define INT4ARRAYOID 1007
408
DATA(insert OID = 1008 ( _regproc PGNSP PGUID -1 f b t \054 0 24 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
409
DATA(insert OID = 1009 ( _text PGNSP PGUID -1 f b t \054 0 25 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
410
DATA(insert OID = 1028 ( _oid PGNSP PGUID -1 f b t \054 0 26 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
411
DATA(insert OID = 1010 ( _tid PGNSP PGUID -1 f b t \054 0 27 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
412
DATA(insert OID = 1011 ( _xid PGNSP PGUID -1 f b t \054 0 28 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
413
DATA(insert OID = 1012 ( _cid PGNSP PGUID -1 f b t \054 0 29 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
414
DATA(insert OID = 1013 ( _oidvector PGNSP PGUID -1 f b t \054 0 30 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
415
DATA(insert OID = 1014 ( _bpchar PGNSP PGUID -1 f b t \054 0 1042 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
416
DATA(insert OID = 1015 ( _varchar PGNSP PGUID -1 f b t \054 0 1043 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
417
DATA(insert OID = 1016 ( _int8 PGNSP PGUID -1 f b t \054 0 20 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
418
DATA(insert OID = 1017 ( _point PGNSP PGUID -1 f b t \054 0 600 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
419
DATA(insert OID = 1018 ( _lseg PGNSP PGUID -1 f b t \054 0 601 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
420
DATA(insert OID = 1019 ( _path PGNSP PGUID -1 f b t \054 0 602 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
421
DATA(insert OID = 1020 ( _box PGNSP PGUID -1 f b t \073 0 603 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
422
DATA(insert OID = 1021 ( _float4 PGNSP PGUID -1 f b t \054 0 700 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
423
DATA(insert OID = 1022 ( _float8 PGNSP PGUID -1 f b t \054 0 701 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
424
DATA(insert OID = 1023 ( _abstime PGNSP PGUID -1 f b t \054 0 702 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
425
DATA(insert OID = 1024 ( _reltime PGNSP PGUID -1 f b t \054 0 703 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
426
DATA(insert OID = 1025 ( _tinterval PGNSP PGUID -1 f b t \054 0 704 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
427
DATA(insert OID = 1027 ( _polygon PGNSP PGUID -1 f b t \054 0 604 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
428
DATA(insert OID = 1033 ( aclitem PGNSP PGUID 12 f b t \054 0 0 aclitemin aclitemout - - - i p f 0 -1 0 _null_ _null_ ));
429
DESCR("access control list");
430
#define ACLITEMOID 1033
431
DATA(insert OID = 1034 ( _aclitem PGNSP PGUID -1 f b t \054 0 1033 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
432
DATA(insert OID = 1040 ( _macaddr PGNSP PGUID -1 f b t \054 0 829 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
433
DATA(insert OID = 1041 ( _inet PGNSP PGUID -1 f b t \054 0 869 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
434
DATA(insert OID = 651 ( _cidr PGNSP PGUID -1 f b t \054 0 650 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
435
DATA(insert OID = 1042 ( bpchar PGNSP PGUID -1 f b t \054 0 0 bpcharin bpcharout bpcharrecv bpcharsend - i x f 0 -1 0 _null_ _null_ ));
436
DESCR("char(length), blank-padded string, fixed storage length");
437
#define BPCHAROID 1042
438
DATA(insert OID = 1043 ( varchar PGNSP PGUID -1 f b t \054 0 0 varcharin varcharout varcharrecv varcharsend - i x f 0 -1 0 _null_ _null_ ));
439
DESCR("varchar(length), non-blank-padded string, variable storage length");
440
#define VARCHAROID 1043
442
DATA(insert OID = 1082 ( date PGNSP PGUID 4 t b t \054 0 0 date_in date_out date_recv date_send - i p f 0 -1 0 _null_ _null_ ));
443
DESCR("ANSI SQL date");
445
DATA(insert OID = 1083 ( time PGNSP PGUID 8 f b t \054 0 0 time_in time_out time_recv time_send - d p f 0 -1 0 _null_ _null_ ));
446
DESCR("hh:mm:ss, ANSI SQL time");
449
/* OIDS 1100 - 1199 */
450
DATA(insert OID = 1114 ( timestamp PGNSP PGUID 8 f b t \054 0 0 timestamp_in timestamp_out timestamp_recv timestamp_send - d p f 0 -1 0 _null_ _null_ ));
451
DESCR("date and time");
452
#define TIMESTAMPOID 1114
453
DATA(insert OID = 1115 ( _timestamp PGNSP PGUID -1 f b t \054 0 1114 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
454
DATA(insert OID = 1182 ( _date PGNSP PGUID -1 f b t \054 0 1082 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
455
DATA(insert OID = 1183 ( _time PGNSP PGUID -1 f b t \054 0 1083 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
456
DATA(insert OID = 1184 ( timestamptz PGNSP PGUID 8 f b t \054 0 0 timestamptz_in timestamptz_out timestamptz_recv timestamptz_send - d p f 0 -1 0 _null_ _null_ ));
457
DESCR("date and time with time zone");
458
#define TIMESTAMPTZOID 1184
459
DATA(insert OID = 1185 ( _timestamptz PGNSP PGUID -1 f b t \054 0 1184 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
460
DATA(insert OID = 1186 ( interval PGNSP PGUID 12 f b t \054 0 0 interval_in interval_out interval_recv interval_send - d p f 0 -1 0 _null_ _null_ ));
461
DESCR("@ <number> <units>, time interval");
462
#define INTERVALOID 1186
463
DATA(insert OID = 1187 ( _interval PGNSP PGUID -1 f b t \054 0 1186 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
465
/* OIDS 1200 - 1299 */
466
DATA(insert OID = 1231 ( _numeric PGNSP PGUID -1 f b t \054 0 1700 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
467
DATA(insert OID = 1266 ( timetz PGNSP PGUID 12 f b t \054 0 0 timetz_in timetz_out timetz_recv timetz_send - d p f 0 -1 0 _null_ _null_ ));
468
DESCR("hh:mm:ss, ANSI SQL time");
469
#define TIMETZOID 1266
470
DATA(insert OID = 1270 ( _timetz PGNSP PGUID -1 f b t \054 0 1266 array_in array_out array_recv array_send - d x f 0 -1 0 _null_ _null_ ));
472
/* OIDS 1500 - 1599 */
473
DATA(insert OID = 1560 ( bit PGNSP PGUID -1 f b t \054 0 0 bit_in bit_out bit_recv bit_send - i x f 0 -1 0 _null_ _null_ ));
474
DESCR("fixed-length bit string");
476
DATA(insert OID = 1561 ( _bit PGNSP PGUID -1 f b t \054 0 1560 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
477
DATA(insert OID = 1562 ( varbit PGNSP PGUID -1 f b t \054 0 0 varbit_in varbit_out varbit_recv varbit_send - i x f 0 -1 0 _null_ _null_ ));
478
DESCR("variable-length bit string");
479
#define VARBITOID 1562
480
DATA(insert OID = 1563 ( _varbit PGNSP PGUID -1 f b t \054 0 1562 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
482
/* OIDS 1600 - 1699 */
484
/* OIDS 1700 - 1799 */
485
DATA(insert OID = 1700 ( numeric PGNSP PGUID -1 f b t \054 0 0 numeric_in numeric_out numeric_recv numeric_send - i m f 0 -1 0 _null_ _null_ ));
486
DESCR("numeric(precision, decimal), arbitrary precision number");
487
#define NUMERICOID 1700
489
DATA(insert OID = 1790 ( refcursor PGNSP PGUID -1 f b t \054 0 0 textin textout textrecv textsend - i x f 0 -1 0 _null_ _null_ ));
490
DESCR("reference cursor (portal name)");
491
#define REFCURSOROID 1790
493
/* OIDS 2200 - 2299 */
494
DATA(insert OID = 2201 ( _refcursor PGNSP PGUID -1 f b t \054 0 1790 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
496
DATA(insert OID = 2202 ( regprocedure PGNSP PGUID 4 t b t \054 0 0 regprocedurein regprocedureout regprocedurerecv regproceduresend - i p f 0 -1 0 _null_ _null_ ));
497
DESCR("registered procedure (with args)");
498
#define REGPROCEDUREOID 2202
500
DATA(insert OID = 2203 ( regoper PGNSP PGUID 4 t b t \054 0 0 regoperin regoperout regoperrecv regopersend - i p f 0 -1 0 _null_ _null_ ));
501
DESCR("registered operator");
502
#define REGOPEROID 2203
504
DATA(insert OID = 2204 ( regoperator PGNSP PGUID 4 t b t \054 0 0 regoperatorin regoperatorout regoperatorrecv regoperatorsend - i p f 0 -1 0 _null_ _null_ ));
505
DESCR("registered operator (with args)");
506
#define REGOPERATOROID 2204
508
DATA(insert OID = 2205 ( regclass PGNSP PGUID 4 t b t \054 0 0 regclassin regclassout regclassrecv regclasssend - i p f 0 -1 0 _null_ _null_ ));
509
DESCR("registered class");
510
#define REGCLASSOID 2205
512
DATA(insert OID = 2206 ( regtype PGNSP PGUID 4 t b t \054 0 0 regtypein regtypeout regtyperecv regtypesend - i p f 0 -1 0 _null_ _null_ ));
513
DESCR("registered type");
514
#define REGTYPEOID 2206
516
DATA(insert OID = 2207 ( _regprocedure PGNSP PGUID -1 f b t \054 0 2202 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
517
DATA(insert OID = 2208 ( _regoper PGNSP PGUID -1 f b t \054 0 2203 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
518
DATA(insert OID = 2209 ( _regoperator PGNSP PGUID -1 f b t \054 0 2204 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
519
DATA(insert OID = 2210 ( _regclass PGNSP PGUID -1 f b t \054 0 2205 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
520
DATA(insert OID = 2211 ( _regtype PGNSP PGUID -1 f b t \054 0 2206 array_in array_out array_recv array_send - i x f 0 -1 0 _null_ _null_ ));
525
* types with typtype='p' represent various special cases in the type system.
527
* These cannot be used to define table columns, but are valid as function
528
* argument and result types (if supported by the function's implementation
531
DATA(insert OID = 2249 ( record PGNSP PGUID -1 f p t \054 0 0 record_in record_out record_recv record_send - d x f 0 -1 0 _null_ _null_ ));
532
#define RECORDOID 2249
533
DATA(insert OID = 2275 ( cstring PGNSP PGUID -2 f p t \054 0 0 cstring_in cstring_out cstring_recv cstring_send - c p f 0 -1 0 _null_ _null_ ));
534
#define CSTRINGOID 2275
535
DATA(insert OID = 2276 ( any PGNSP PGUID 4 t p t \054 0 0 any_in any_out - - - i p f 0 -1 0 _null_ _null_ ));
537
DATA(insert OID = 2277 ( anyarray PGNSP PGUID -1 f p t \054 0 0 anyarray_in anyarray_out anyarray_recv anyarray_send - d x f 0 -1 0 _null_ _null_ ));
538
#define ANYARRAYOID 2277
539
DATA(insert OID = 2278 ( void PGNSP PGUID 4 t p t \054 0 0 void_in void_out - - - i p f 0 -1 0 _null_ _null_ ));
541
DATA(insert OID = 2279 ( trigger PGNSP PGUID 4 t p t \054 0 0 trigger_in trigger_out - - - i p f 0 -1 0 _null_ _null_ ));
542
#define TRIGGEROID 2279
543
DATA(insert OID = 2280 ( language_handler PGNSP PGUID 4 t p t \054 0 0 language_handler_in language_handler_out - - - i p f 0 -1 0 _null_ _null_ ));
544
#define LANGUAGE_HANDLEROID 2280
545
DATA(insert OID = 2281 ( internal PGNSP PGUID 4 t p t \054 0 0 internal_in internal_out - - - i p f 0 -1 0 _null_ _null_ ));
546
#define INTERNALOID 2281
547
DATA(insert OID = 2282 ( opaque PGNSP PGUID 4 t p t \054 0 0 opaque_in opaque_out - - - i p f 0 -1 0 _null_ _null_ ));
548
#define OPAQUEOID 2282
549
DATA(insert OID = 2283 ( anyelement PGNSP PGUID 4 t p t \054 0 0 anyelement_in anyelement_out - - - i p f 0 -1 0 _null_ _null_ ));
550
#define ANYELEMENTOID 2283
553
* prototypes for functions in pg_type.c
555
extern Oid TypeShellMake(const char *typeName, Oid typeNamespace);
557
extern Oid TypeCreate(const char *typeName,
567
Oid receiveProcedure,
569
Oid analyzeProcedure,
572
const char *defaultTypeValue,
573
char *defaultTypeBin,
581
extern void GenerateTypeDependencies(Oid typeNamespace,
587
Oid receiveProcedure,
589
Oid analyzeProcedure,
595
extern void TypeRename(const char *oldTypeName, Oid typeNamespace,
596
const char *newTypeName);
598
extern char *makeArrayTypeName(const char *typeName);
600
#endif /* PG_TYPE_H */