39#include "utils/fmgroids.h"
220 && (
strcmp(argv[1],
"--boot") == 0
221 ||
strcmp(argv[1],
"--check") == 0));
225 while ((
flag =
getopt(argc, argv,
"B:c:d:D:Fkr:X:-:")) != -1)
257 errmsg(
"--%s requires a value",
262 errmsg(
"-c %s requires a value",
300 write_stderr(
"Try \"%s --help\" for more information.\n",
375 elog(
ERROR,
"backend is incorrectly linked to frontend functions");
477 elog(
DEBUG4,
"create attribute %d name %s len %d num %d type %u",
478 i,
NameStr(at->attname), at->attlen, at->attnum,
496 elog(
ERROR,
"close of %s when %s was expected",
500 elog(
ERROR,
"close of %s before any relation was opened",
505 elog(
ERROR,
"no open relation to close");
532 elog(
WARNING,
"no open relations allowed with CREATE command");
680 &typdelim, &typioparam,
705 "NULL value specified for not-null column \"%s\" of relation \"%s\"",
859 if (
ap->am_oid == typid)
863 if (!
ap ||
ap->am_oid != typid)
864 elog(
ERROR,
"type OID %u not found in Typ list", typid);
866 *typlen =
ap->am_typ.typlen;
867 *typbyval =
ap->am_typ.typbyval;
869 *typdelim =
ap->am_typ.typdelim;
873 *typioparam =
ap->am_typ.typelem;
878 *typoutput =
ap->am_typ.typoutput;
891 elog(
ERROR,
"type OID %u not found in TypInfo", typid);
963 newind->il_info->ii_Expressions =
965 newind->il_info->ii_ExpressionsState =
NIL;
967 newind->il_info->ii_Predicate =
#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)
struct _IndexList IndexList
static void bootstrap_signals(void)
Form_pg_attribute attrtypes[MAXATTR]
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput)
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 Assert(condition)
#define MemSet(start, val, len)
#define OidIsValid(objectId)
int errmsg_internal(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#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)
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)
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)
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
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)
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 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)