1/*-------------------------------------------------------------------------
2 *
3 * pg_cast_d.h
4 * Macro definitions for pg_cast
5 *
6 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 * NOTES
10 * ******************************
11 * *** DO NOT EDIT THIS FILE! ***
12 * ******************************
13 *
14 * It has been GENERATED by src/backend/catalog/genbki.pl
15 *
16 *-------------------------------------------------------------------------
17 */
18#ifndef PG_CAST_D_H
19#define PG_CAST_D_H
20
21#define CastRelationId 2605
22
23#define Anum_pg_cast_oid 1
24#define Anum_pg_cast_castsource 2
25#define Anum_pg_cast_casttarget 3
26#define Anum_pg_cast_castfunc 4
27#define Anum_pg_cast_castcontext 5
28#define Anum_pg_cast_castmethod 6
29
30#define Natts_pg_cast 6
31
32
33/*
34 * The allowable values for pg_cast.castcontext are specified by this enum.
35 * Since castcontext is stored as a "char", we use ASCII codes for human
36 * convenience in reading the table. Note that internally to the backend,
37 * these values are converted to the CoercionContext enum (see primnodes.h),
38 * which is defined to sort in a convenient order; the ASCII codes don't
39 * have to sort in any special order.
40 */
41
42typedef enum CoercionCodes
43{
44 COERCION_CODE_IMPLICIT = 'i', /* coercion in context of expression */
45 COERCION_CODE_ASSIGNMENT = 'a', /* coercion in context of assignment */
46 COERCION_CODE_EXPLICIT = 'e' /* explicit cast operation */
47} CoercionCodes;
48
49/*
50 * The allowable values for pg_cast.castmethod are specified by this enum.
51 * Since castmethod is stored as a "char", we use ASCII codes for human
52 * convenience in reading the table.
53 */
54typedef enum CoercionMethod
55{
56 COERCION_METHOD_FUNCTION = 'f', /* use a function */
57 COERCION_METHOD_BINARY = 'b', /* types are binary-compatible */
58 COERCION_METHOD_INOUT = 'i' /* use input/output functions */
59} CoercionMethod;
60
61
62#endif /* PG_CAST_D_H */
63