40#include "utils/fmgroids.h"
212 && (
strcmp(argv[1],
"--boot") == 0
213 ||
strcmp(argv[1],
"--check") == 0));
217 while ((
flag =
getopt(argc, argv,
"B:c:d:D:Fkr:X:-:")) != -1)
249 errmsg(
"--%s requires a value",
254 errmsg(
"-c %s requires a value",
292 write_stderr(
"Try \"%s --help\" for more information.\n",
367 elog(
ERROR,
"backend is incorrectly linked to frontend functions");
469 elog(
DEBUG4,
"create attribute %d name %s len %d num %d type %u",
470 i,
NameStr(at->attname), at->attlen, at->attnum,
488 elog(
ERROR,
"close of %s when %s was expected",
492 elog(
ERROR,
"close of %s before any relation was opened",
497 elog(
ERROR,
"no open relation to close");
524 elog(
WARNING,
"no open relations allowed with CREATE command");
671 typoid = attr->atttypid;
675 &typdelim, &typioparam,
691 elog(
ERROR,
"can't handle pg_node_tree input for %s.%s",
733 "pronargs must come before proargdefaults");
735 "pronargdefaults must come before proargdefaults");
737 "proargtypes must come before proargdefaults");
739 elog(
ERROR,
"pronargs must not be null");
741 elog(
ERROR,
"proargtypes must not be null");
756 elog(
ERROR,
"too many proargdefaults entries");
777 &typdelim, &typioparam,
826 "NULL value specified for not-null column \"%s\" of relation \"%s\"",
982 if (
ap->am_oid == typid)
986 if (!
ap ||
ap->am_oid != typid)
987 elog(
ERROR,
"type OID %u not found in Typ list", typid);
989 *typlen =
ap->am_typ.typlen;
990 *typbyval =
ap->am_typ.typbyval;
992 *typdelim =
ap->am_typ.typdelim;
996 *typioparam =
ap->am_typ.typelem;
1001 *typoutput =
ap->am_typ.typoutput;
1003 *typcollation =
ap->am_typ.typcollation;
1016 elog(
ERROR,
"type OID %u not found in TypInfo", typid);
1028 *typioparam = typid;
1090 newind->il_info->ii_Expressions =
1092 newind->il_info->ii_ExpressionsState =
NIL;
1094 newind->il_info->ii_Predicate =
#define DatumGetArrayTypeP(X)
void deconstruct_array_builtin(const ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
#define write_stderr(str)
static Oid gettype(char *type)
static Datum values[MAXATTR]
void closerel(char *relname)
static void populate_typ_list(void)
static void CheckerModeMain(void)
void InsertOneValue(char *value, int i)
static void cleanup(void)
void InsertOneNull(int i)
static const struct typinfo TypInfo[]
static struct typmap * Ap
void InsertOneTuple(void)
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput, Oid *typcollation)
static void InsertOneProargdefaultsValue(char *value)
struct _IndexList IndexList
static void bootstrap_signals(void)
Form_pg_attribute attrtypes[MAXATTR]
static Form_pg_attribute AllocateAttribute(void)
static MemoryContext nogc
void BootstrapModeMain(int argc, char *argv[], bool check_only)
void DefineAttr(char *name, char *type, int attnum, int nullness)
static bool Nulls[MAXATTR]
void index_register(Oid heap, Oid ind, const IndexInfo *indexInfo)
void boot_openrel(char *relname)
static IndexList * ILHead
#define BOOTCOL_NULL_FORCE_NULL
int boot_yylex_init(yyscan_t *yyscannerp)
#define BOOTCOL_NULL_FORCE_NOT_NULL
#define BOOTCOL_NULL_AUTO
int boot_yyparse(yyscan_t yyscanner)
#define PG_DATA_CHECKSUM_VERSION
#define CStringGetTextDatum(s)
#define Assert(condition)
#define MemSet(start, val, len)
#define StaticAssertDecl(condition, errmessage)
#define OidIsValid(objectId)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
int int errmsg_internal(const char *fmt,...) pg_attribute_printf(1
#define ereport(elevel,...)
void set_max_safe_fds(void)
#define palloc_object(type)
Datum OidInputFunctionCall(Oid functionId, char *str, Oid typioparam, int32 typmod)
char * OidOutputFunctionCall(Oid functionId, Datum val)
#define OidFunctionCall3(functionId, arg1, arg2, arg3)
char OutputFileName[MAXPGPATH]
void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source)
bool SelectConfigFiles(const char *userDoption, const char *progname)
void ParseLongOption(const char *string, char **name, char **value)
void InitializeGUCOptions(void)
HeapTuple heap_getnext(TableScanDesc sscan, ScanDirection direction)
void simple_heap_insert(Relation relation, HeapTuple tup)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_freetuple(HeapTuple htup)
static void * GETSTRUCT(const HeapTupleData *tuple)
void index_build(Relation heapRelation, Relation indexRelation, IndexInfo *indexInfo, bool isreindex, bool parallel)
void index_close(Relation relation, LOCKMODE lockmode)
Relation index_open(Oid relationId, LOCKMODE lockmode)
void CreateSharedMemoryAndSemaphores(void)
bool pg_link_canary_is_frontend(void)
List * lappend(List *list, void *datum)
void list_free_deep(List *list)
DispatchOption parse_dispatch_option(const char *name)
RangeVar * makeRangeVar(char *schemaname, char *relname, int location)
Const * makeConst(Oid consttype, int32 consttypmod, Oid constcollid, int constlen, Datum constvalue, bool constisnull, bool constbyval)
void * MemoryContextAllocZero(MemoryContext context, Size size)
char * pstrdup(const char *in)
void pfree(void *pointer)
MemoryContext TopMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define SetProcessingMode(mode)
void ChangeToDataDir(void)
void InitStandaloneProcess(const char *argv0)
void CreateDataDirLockFile(bool amPostmaster)
void namestrcpy(Name name, const char *str)
char * nodeToString(const void *obj)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define ATTRIBUTE_FIXED_PART_SIZE
FormData_pg_attribute * Form_pg_attribute
int getopt(int nargc, char *const *nargv, const char *ostr)
PGDLLIMPORT char * optarg
END_CATALOG_STRUCT typedef FormData_pg_type * Form_pg_type
void InitPostmasterChildSlots(void)
size_t strlcpy(char *dst, const char *src, size_t siz)
static const char * userDoption
static Datum PointerGetDatum(const void *X)
static Datum Int16GetDatum(int16 X)
static Datum ObjectIdGetDatum(Oid X)
static char * DatumGetCString(Datum X)
static Pointer DatumGetPointer(Datum X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
static int16 DatumGetInt16(Datum X)
void InitializeMaxBackends(void)
void InitializeFastPathLocks(void)
void InitPostgres(const char *in_dbname, Oid dboid, const char *username, Oid useroid, bits32 flags, char *out_dbname)
char * psprintf(const char *fmt,...)
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
#define RelationGetNumberOfAttributes(relation)
#define RelationGetRelationName(relation)
void RelationMapFinishBootstrap(void)
uint16 * ii_ExclusionStrats
struct _IndexList * il_next
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
Relation table_openrv(const RangeVar *relation, LOCKMODE lockmode)
TableScanDesc table_beginscan_catalog(Relation relation, int nkeys, ScanKeyData *key)
static void table_endscan(TableScanDesc scan)
#define InvalidCompressionMethod
TupleDesc CreateTupleDesc(int natts, Form_pg_attribute *attrs)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
void StartTransactionCommand(void)
void CommitTransactionCommand(void)
void BootStrapXLOG(uint32 data_checksum_version)