}
/*
-* Amcheck main workhorse.
-* Given index relation OID, lock relation.
-* Next, take a number of standard actions:
-* 1) Make sure the index can be checked
-* 2) change the context of the user,
-* 3) keep track of GUCs modified via index functions
-* 4) execute callback function to verify integrity.
-*/
+ * Amcheck main workhorse.
+ * Given index relation OID, lock relation.
+ * Next, take a number of standard actions:
+ * 1) Make sure the index can be checked
+ * 2) change the context of the user,
+ * 3) keep track of GUCs modified via index functions
+ * 4) execute callback function to verify integrity.
+ */
void
amcheck_lock_relation_and_check(Oid indrelid,
Oid am_id,
/*
-** GiST DeCompress methods
-** do not do anything.
-*/
+ * GiST DeCompress methods
+ * do not do anything.
+ */
Datum
gbt_decompress(PG_FUNCTION_ARGS)
{
/*
-** The GiST union method for numerical values
-*/
+ * The GiST union method for numerical values
+ */
void *
gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
/*
-** The GiST same method for numerical values
-*/
+ * The GiST same method for numerical values
+ */
bool
gbt_num_same(const GBT_NUMKEY *a, const GBT_NUMKEY *b, const gbtree_ninfo *tinfo, FmgrInfo *flinfo)
/*
-** The GiST distance method (for KNN-Gist)
-*/
+ * The GiST distance method (for KNN-Gist)
+ */
float8
gbt_num_distance(const GBT_NUMKEY_R *key,
*
* If the underlying type is character data, the prefix length may point in
* the middle of a multibyte character.
-*/
+ */
static int32
gbt_var_node_cp_len(const GBT_VARKEY *node, const gbtree_vinfo *tinfo)
{
/*
-* truncates / compresses the node key
-* cpf_length .. common prefix length
-*/
+ * truncates / compresses the node key
+ * cpf_length .. common prefix length
+ */
static GBT_VARKEY *
gbt_var_node_truncate(const GBT_VARKEY *node, int32 cpf_length, const gbtree_vinfo *tinfo)
{
#define ARRNELEMS(x) ArrayGetNItems( ARR_NDIM(x), ARR_DIMS(x))
/*
-** Input/Output routines
-*/
+ * Input/Output routines
+ */
PG_FUNCTION_INFO_V1(cube_in);
PG_FUNCTION_INFO_V1(cube_a_f8_f8);
PG_FUNCTION_INFO_V1(cube_a_f8);
PG_FUNCTION_INFO_V1(cube_subset);
/*
-** GiST support methods
-*/
+ * GiST support methods
+ */
PG_FUNCTION_INFO_V1(g_cube_consistent);
PG_FUNCTION_INFO_V1(g_cube_compress);
PG_FUNCTION_INFO_V1(g_cube_distance);
/*
-** B-tree support functions
-*/
+ * B-tree support functions
+ */
PG_FUNCTION_INFO_V1(cube_eq);
PG_FUNCTION_INFO_V1(cube_ne);
PG_FUNCTION_INFO_V1(cube_lt);
PG_FUNCTION_INFO_V1(cube_cmp);
/*
-** R-tree support functions
-*/
+ * R-tree support functions
+ */
PG_FUNCTION_INFO_V1(cube_contains);
PG_FUNCTION_INFO_V1(cube_contained);
PG_FUNCTION_INFO_V1(cube_size);
/*
-** miscellaneous
-*/
+ * miscellaneous
+ */
PG_FUNCTION_INFO_V1(distance_taxicab);
PG_FUNCTION_INFO_V1(cube_distance);
PG_FUNCTION_INFO_V1(distance_chebyshev);
PG_FUNCTION_INFO_V1(cube_enlarge);
/*
-** For internal use only
-*/
+ * For internal use only
+ */
int32 cube_cmp_v0(NDBOX *a, NDBOX *b);
bool cube_contains_v0(NDBOX *a, NDBOX *b);
bool cube_overlap_v0(NDBOX *a, NDBOX *b);
bool g_cube_internal_consistent(NDBOX *key, NDBOX *query, StrategyNumber strategy);
/*
-** Auxiliary functions
-*/
+ * Auxiliary functions
+ */
static double distance_1D(double a1, double a2, double b1, double b2);
static bool cube_is_point_internal(NDBOX *cube);
/*
-** Allows the construction of a cube from 2 float[]'s
-*/
+ * Allows the construction of a cube from 2 float[]'s
+ */
Datum
cube_a_f8_f8(PG_FUNCTION_ARGS)
{
}
/*
-** Allows the construction of a zero-volume cube from a float[]
-*/
+ * Allows the construction of a zero-volume cube from a float[]
+ */
Datum
cube_a_f8(PG_FUNCTION_ARGS)
{
*****************************************************************************/
/*
-** The GiST Consistent method for boxes
-** Should return false if for all data items x below entry,
-** the predicate x op query == false, where op is the oper
-** corresponding to strategy in the pg_amop table.
-*/
+ * The GiST Consistent method for boxes
+ * Should return false if for all data items x below entry,
+ * the predicate x op query == false, where op is the oper
+ * corresponding to strategy in the pg_amop table.
+ */
Datum
g_cube_consistent(PG_FUNCTION_ARGS)
{
/*
-** The GiST Union method for boxes
-** returns the minimal bounding box that encloses all the entries in entryvec
-*/
+ * The GiST Union method for boxes
+ * returns the minimal bounding box that encloses all the entries in entryvec
+ */
Datum
g_cube_union(PG_FUNCTION_ARGS)
{
}
/*
-** GiST Compress and Decompress methods for boxes
-** do not do anything.
-*/
+ * GiST Compress and Decompress methods for boxes
+ * do not do anything.
+ */
Datum
g_cube_compress(PG_FUNCTION_ARGS)
/*
-** The GiST Penalty method for boxes
-** As in the R-tree paper, we use change in area as our penalty metric
-*/
+ * The GiST Penalty method for boxes
+ * As in the R-tree paper, we use change in area as our penalty metric
+ */
Datum
g_cube_penalty(PG_FUNCTION_ARGS)
{
/*
-** The GiST PickSplit method for boxes
-** We use Guttman's poly time split algorithm
-*/
+ * The GiST PickSplit method for boxes
+ * We use Guttman's poly time split algorithm
+ */
Datum
g_cube_picksplit(PG_FUNCTION_ARGS)
{
}
/*
-** Equality method
-*/
+ * Equality method
+ */
Datum
g_cube_same(PG_FUNCTION_ARGS)
{
}
/*
-** SUPPORT ROUTINES
-*/
+ * SUPPORT ROUTINES
+ */
bool
g_cube_leaf_consistent(NDBOX *key,
NDBOX *query,
*size = result;
}
-/* make up a metric in which one box will be 'lower' than the other
- -- this can be useful for sorting and to determine uniqueness */
+/*
+ * make up a metric in which one box will be 'lower' than the other
+ * -- this can be useful for sorting and to determine uniqueness
+ */
int32
cube_cmp_v0(NDBOX *a, NDBOX *b)
{
/* Distance */
-/* The distance is computed as a per axis sum of the squared distances
- between 1D projections of the boxes onto Cartesian axes. Assuming zero
- distance between overlapping projections, this metric coincides with the
- "common sense" geometric distance */
+/*
+ * The distance is computed as a per axis sum of the squared distances
+ * between 1D projections of the boxes onto Cartesian axes. Assuming zero
+ * distance between overlapping projections, this metric coincides with the
+ * "common sense" geometric distance
+ */
Datum
cube_distance(PG_FUNCTION_ARGS)
{
PG_RETURN_NDBOX_P(result);
}
-/* Add a dimension to an existing cube with the same values for the new
- coordinate */
+/*
+ * Add a dimension to an existing cube with the same values for the new
+ * coordinate
+ */
Datum
cube_c_f8(PG_FUNCTION_ARGS)
{
static void dblink_security_check(PGconn *conn, const char *connname,
const char *connstr);
static void dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
- bool fail, const char *fmt,...) pg_attribute_printf(5, 6);
+ bool fail, const char *fmt, ...) pg_attribute_printf(5, 6);
static char *get_connect_string(const char *servername);
static char *escape_param_str(const char *str);
static void validate_pkattnums(Relation rel,
*/
static void
dblink_res_error(PGconn *conn, const char *conname, PGresult *res,
- bool fail, const char *fmt,...)
+ bool fail, const char *fmt, ...)
{
int level;
char *pg_diag_sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
* 744300 instead of 743000 as for "BEST".
* - "J" is considered (only) a consonant in DaitchMokotoffSoundex.java
* - "Y" is not considered a vowel in DaitchMokotoffSoundex.java
-*/
+ */
#include "postgres.h"
* The soundex coding chart table is adapted from
* https://www.jewishgen.org/InfoFiles/Soundex.html
* See daitch_mokotoff_header.pl for details.
-*/
+ */
/* Generated coding chart table */
#include "daitch_mokotoff.h"
/*
- Caveats: the START value is 0 based
-*/
+ * Caveats: the START value is 0 based
+ */
static int
-StringAt(metastring *s, int start, int length,...)
+StringAt(metastring *s, int start, int length, ...)
{
char *test;
char *pos;
****************************************************************************/
-/* I add modifications to the traditional metaphone algorithm that you
- might find in books. Define this if you want metaphone to behave
- traditionally */
+/*
+ * I add modifications to the traditional metaphone algorithm that you
+ * might find in books. Define this if you want metaphone to behave
+ * traditionally
+ */
#undef USE_TRADITIONAL_METAPHONE
/* Special encodings */
* function (palloc, etc).
*/
-/* I suppose I could have been using a character pointer instead of
- * accessing the array directly... */
+/*
+ * I suppose I could have been using a character pointer instead of
+ * accessing the array directly...
+ */
/* Look at the next letter in the word */
#define Next_Letter (pg_ascii_toupper((unsigned char) word[w_idx+1]))
/* or: #define MAXNUMELTS 1000000 */
/*
-** GiST support methods
-*/
+ * GiST support methods
+ */
PG_FUNCTION_INFO_V1(g_int_consistent);
PG_FUNCTION_INFO_V1(g_int_compress);
PG_FUNCTION_INFO_V1(g_int_decompress);
/*
-** The GiST Consistent method for _intments
-** Should return false if for all data items x below entry,
-** the predicate x op query == false, where op is the oper
-** corresponding to strategy in the pg_amop table.
-*/
+ * The GiST Consistent method for _intments
+ * Should return false if for all data items x below entry,
+ * the predicate x op query == false, where op is the oper
+ * corresponding to strategy in the pg_amop table.
+ */
Datum
g_int_consistent(PG_FUNCTION_ARGS)
{
}
/*
-** GiST Compress and Decompress methods
-*/
+ * GiST Compress and Decompress methods
+ */
Datum
g_int_compress(PG_FUNCTION_ARGS)
{
}
/*
-** The GiST Penalty method for _intments
-*/
+ * The GiST Penalty method for _intments
+ */
Datum
g_int_penalty(PG_FUNCTION_ARGS)
{
}
/*
-** The GiST PickSplit method for _intments
-** We use Guttman's poly time split algorithm
-*/
+ * The GiST PickSplit method for _intments
+ * We use Guttman's poly time split algorithm
+ */
Datum
g_int_picksplit(PG_FUNCTION_ARGS)
{
PG_RETURN_BOOL(result);
}
-/* _int_overlap -- does a overlap b?
+/*
+ * _int_overlap -- does a overlap b?
*/
Datum
_int_overlap(PG_FUNCTION_ARGS)
#define GETENTRY(vec,pos) ((GISTTYPE *) DatumGetPointer((vec)->vector[(pos)].key))
/*
-** _intbig methods
-*/
+ * _intbig methods
+ */
PG_FUNCTION_INFO_V1(g_intbig_consistent);
PG_FUNCTION_INFO_V1(g_intbig_compress);
PG_FUNCTION_INFO_V1(g_intbig_decompress);
MarkGUCPrefixReserved("isn");
}
-/* isn_out
+/*
+ * isn_out
*/
PG_FUNCTION_INFO_V1(isn_out);
Datum
PG_RETURN_CSTRING(result);
}
-/* ean13_out
+/*
+ * ean13_out
*/
PG_FUNCTION_INFO_V1(ean13_out);
Datum
PG_RETURN_CSTRING(result);
}
-/* ean13_in
+/*
+ * ean13_in
*/
PG_FUNCTION_INFO_V1(ean13_in);
Datum
PG_RETURN_EAN13(result);
}
-/* isbn_in
+/*
+ * isbn_in
*/
PG_FUNCTION_INFO_V1(isbn_in);
Datum
PG_RETURN_EAN13(result);
}
-/* ismn_in
+/*
+ * ismn_in
*/
PG_FUNCTION_INFO_V1(ismn_in);
Datum
PG_RETURN_EAN13(result);
}
-/* issn_in
+/*
+ * issn_in
*/
PG_FUNCTION_INFO_V1(issn_in);
Datum
PG_RETURN_EAN13(result);
}
-/* upc_in
+/*
+ * upc_in
*/
PG_FUNCTION_INFO_V1(upc_in);
Datum
PG_RETURN_EAN13(result);
}
-/* casting functions
-*/
+/*
+ * casting functions
+ */
PG_FUNCTION_INFO_V1(isbn_cast_from_ean13);
Datum
isbn_cast_from_ean13(PG_FUNCTION_ARGS)
}
-/* is_valid - returns false if the "invalid-check-digit-on-input" is set
+/*
+ * is_valid - returns false if the "invalid-check-digit-on-input" is set
*/
PG_FUNCTION_INFO_V1(is_valid);
Datum
PG_RETURN_BOOL((val & 1) == 0);
}
-/* make_valid - unsets the "invalid-check-digit-on-input" flag
+/*
+ * make_valid - unsets the "invalid-check-digit-on-input" flag
*/
PG_FUNCTION_INFO_V1(make_valid);
Datum
PG_RETURN_EAN13(val);
}
-/* this function temporarily sets weak input flag
+/*
+ * this function temporarily sets weak input flag
* (to lose the strictness of check digit acceptance)
*/
PG_FUNCTION_INFO_V1(accept_weak_input);
typedef char *(*PLyObject_AsString_t) (PyObject *plrv);
static PLyObject_AsString_t PLyObject_AsString_p;
-typedef void (*PLy_elog_impl_t) (int elevel, const char *fmt,...);
+typedef void (*PLy_elog_impl_t) (int elevel, const char *fmt, ...);
static PLy_elog_impl_t PLy_elog_impl_p;
/*
output[7 + 22 - 1] = BF_itoa64[(int)
BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];
-/* This has to be bug-compatible with the original implementation, so
- * only encode 23 of the 24 bytes. :-) */
+/*
+ * This has to be bug-compatible with the original implementation, so
+ * only encode 23 of the 24 bytes. :-)
+ */
BF_swap(data.binary.output, 6);
BF_encode(&output[7 + 22], data.binary.output, 23);
output[7 + 22 + 31] = '\0';
-/* Overwrite the most obvious sensitive data we have on the stack. Note
+/*
+ * Overwrite the most obvious sensitive data we have on the stack. Note
* that this does not guarantee there's no sensitive data left on the
- * stack and/or in registers; I'm not aware of portable code that does. */
+ * stack and/or in registers; I'm not aware of portable code that does.
+ */
px_memset(&data, 0, sizeof(data));
return output;
{
unsigned long value;
-/* Even iteration counts make it easier to detect weak DES keys from a look
- * at the hash, so they should be avoided */
+/*
+ * Even iteration counts make it easier to detect weak DES keys from a look
+ * at the hash, so they should be avoided
+ */
if (size < 3 || output_size < 1 + 4 + 4 + 1 ||
(count && (count > 0xffffff || !(count & 1))))
{
}
void
-px_debug(const char *fmt,...)
+px_debug(const char *fmt, ...)
{
va_list ap;
void CheckBuiltinCryptoMode(void);
#ifdef PX_DEBUG
-void px_debug(const char *fmt,...) pg_attribute_printf(1, 2);
+void px_debug(const char *fmt, ...) pg_attribute_printf(1, 2);
#else
#define px_debug(...)
#endif
const char *relname = NULL;
ForeignTable *table;
ForeignServer *server;
- RemoteStatsResults remstats = {.rel = NULL,.att = NULL};
+ RemoteStatsResults remstats = {.rel = NULL, .att = NULL};
RemoteAttributeMapping *remattrmap = NULL;
int attrcnt = 0;
bool restore_stats = false;
/*
* contrib/seg/seg.c
*
- ******************************************************************************
- This file contains routines that can be bound to a Postgres backend and
- called by the backend in the process of processing queries. The calling
- format for these routines is dictated by Postgres architecture.
-******************************************************************************/
+ *
+ * This file contains routines that can be bound to a Postgres backend and
+ * called by the backend in the process of processing queries. The calling
+ * format for these routines is dictated by Postgres architecture.
+ */
#include "postgres.h"
/*
-#define GIST_DEBUG
-#define GIST_QUERY_DEBUG
-*/
+ * #define GIST_DEBUG
+ * #define GIST_QUERY_DEBUG
+ */
PG_MODULE_MAGIC_EXT(
.name = "seg",
} gseg_picksplit_item;
/*
-** Input/Output routines
-*/
+ * Input/Output routines
+ */
PG_FUNCTION_INFO_V1(seg_in);
PG_FUNCTION_INFO_V1(seg_out);
PG_FUNCTION_INFO_V1(seg_size);
PG_FUNCTION_INFO_V1(seg_center);
/*
-** GiST support methods
-*/
+ * GiST support methods
+ */
PG_FUNCTION_INFO_V1(gseg_consistent);
PG_FUNCTION_INFO_V1(gseg_compress);
PG_FUNCTION_INFO_V1(gseg_decompress);
/*
-** R-tree support functions
-*/
+ * R-tree support functions
+ */
PG_FUNCTION_INFO_V1(seg_same);
PG_FUNCTION_INFO_V1(seg_contains);
PG_FUNCTION_INFO_V1(seg_contained);
static void rt_seg_size(SEG *a, float *size);
/*
-** Various operators
-*/
+ * Various operators
+ */
PG_FUNCTION_INFO_V1(seg_cmp);
PG_FUNCTION_INFO_V1(seg_lt);
PG_FUNCTION_INFO_V1(seg_le);
PG_FUNCTION_INFO_V1(seg_different);
/*
-** Auxiliary functions
-*/
+ * Auxiliary functions
+ */
static int restore(char *result, float val, int n);
*****************************************************************************/
/*
-** The GiST Consistent method for segments
-** Should return false if for all data items x below entry,
-** the predicate x op query == false, where op is the oper
-** corresponding to strategy in the pg_amop table.
-*/
+ * The GiST Consistent method for segments
+ * Should return false if for all data items x below entry,
+ * the predicate x op query == false, where op is the oper
+ * corresponding to strategy in the pg_amop table.
+ */
Datum
gseg_consistent(PG_FUNCTION_ARGS)
{
}
/*
-** The GiST Union method for segments
-** returns the minimal bounding seg that encloses all the entries in entryvec
-*/
+ * The GiST Union method for segments
+ * returns the minimal bounding seg that encloses all the entries in entryvec
+ */
Datum
gseg_union(PG_FUNCTION_ARGS)
{
}
/*
-** GiST Compress and Decompress methods for segments
-** do not do anything.
-*/
+ * GiST Compress and Decompress methods for segments
+ * do not do anything.
+ */
Datum
gseg_compress(PG_FUNCTION_ARGS)
{
}
/*
-** The GiST Penalty method for segments
-** As in the R-tree paper, we use change in area as our penalty metric
-*/
+ * The GiST Penalty method for segments
+ * As in the R-tree paper, we use change in area as our penalty metric
+ */
Datum
gseg_penalty(PG_FUNCTION_ARGS)
{
}
/*
-** Equality methods
-*/
+ * Equality methods
+ */
Datum
gseg_same(PG_FUNCTION_ARGS)
{
}
/*
-** SUPPORT ROUTINES
-*/
+ * SUPPORT ROUTINES
+ */
static Datum
gseg_leaf_consistent(Datum key, Datum query, StrategyNumber strategy)
{
PG_RETURN_BOOL(cmp == 0);
}
-/* seg_overlap -- does a overlap b?
+/*
+ * seg_overlap -- does a overlap b?
*/
Datum
seg_overlap(PG_FUNCTION_ARGS)
((b->upper >= a->upper) && (b->lower <= a->upper)));
}
-/* seg_over_left -- is the right edge of (a) located at or left of the right edge of (b)?
+/*
+ * seg_over_left -- is the right edge of (a) located at or left of the right edge of (b)?
*/
Datum
seg_over_left(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(a->upper <= b->upper);
}
-/* seg_left -- is (a) entirely on the left of (b)?
+/*
+ * seg_left -- is (a) entirely on the left of (b)?
*/
Datum
seg_left(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(a->upper < b->lower);
}
-/* seg_right -- is (a) entirely on the right of (b)?
+/*
+ * seg_right -- is (a) entirely on the right of (b)?
*/
Datum
seg_right(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(a->lower > b->upper);
}
-/* seg_over_right -- is the left edge of (a) located at or right of the left edge of (b)?
+/*
+ * seg_over_right -- is the left edge of (a) located at or right of the left edge of (b)?
*/
Datum
seg_over_right(PG_FUNCTION_ARGS)
/*
-** Miscellany
-*/
+ * Miscellany
+ */
-/* find out the number of significant digits in a string representing
+/*
+ * find out the number of significant digits in a string representing
* a floating point number
*/
int
/*
-moddatetime.c
-
-contrib/spi/moddatetime.c
-
-What is this?
-It is a function to be called from a trigger for the purpose of updating
-a modification datetime stamp in a record when that record is UPDATEd.
-
-Credits
-This is 95%+ based on autoinc.c, which I used as a starting point as I do
-not really know what I am doing. I also had help from
-Jan Wieck <jwieck@debis.com> who told me about the timestamp_in("now") function.
-OH, me, I'm Terry Mackintosh <terry@terrym.com>
-*/
+ * moddatetime.c
+ *
+ * contrib/spi/moddatetime.c
+ *
+ * What is this?
+ * It is a function to be called from a trigger for the purpose of updating
+ * a modification datetime stamp in a record when that record is UPDATEd.
+ *
+ * Credits
+ * This is 95%+ based on autoinc.c, which I used as a starting point as I do
+ * not really know what I am doing. I also had help from
+ * Jan Wieck <jwieck@debis.com> who told me about the timestamp_in("now") function.
+ * OH, me, I'm Terry Mackintosh <terry@terrym.com>
+ */
#include "postgres.h"
#include "access/htup_details.h"
}
-/* Translate a PostgreSQL "varlena" -i.e. a variable length parameter
+/*
+ * Translate a PostgreSQL "varlena" -i.e. a variable length parameter
* into the libxml2 representation
*/
static xmlChar *
}
/*
-* _gin_parse_tuple_items
+ * _gin_parse_tuple_items
* Return a pointer to a palloc'd array of decompressed TID array.
*/
static ItemPointer
*/
bool
check_amproc_signature(Oid funcid, Oid restype, bool exact,
- int minargs, int maxargs,...)
+ int minargs, int maxargs, ...)
{
bool result = true;
HeapTuple tp;
* compare the value that they're searching for to a binary search pivot.
* However, unlike _bt_compare, this function's "tuple argument" comes first,
* while its "array/scankey argument" comes second.
-*/
+ */
static inline int32
_bt_compare_array_skey(FmgrInfo *orderproc,
Datum tupdatum, bool tupnull,
* *EndPos value. However, if we are already at the beginning of the current
* segment, *StartPos and *EndPos are set to the current location without
* reserving any space, and the function returns false.
-*/
+ */
static bool
ReserveXLogSwitch(XLogRecPtr *StartPos, XLogRecPtr *EndPos, XLogRecPtr *PrevPtr)
{
#include "common/logging.h"
#endif
-static void report_invalid_record(XLogReaderState *state, const char *fmt,...)
+static void report_invalid_record(XLogReaderState *state, const char *fmt, ...)
pg_attribute_printf(2, 3);
static void allocate_recordbuf(XLogReaderState *state, uint32 reclength);
static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr,
* the current record being read.
*/
static void
-report_invalid_record(XLogReaderState *state, const char *fmt,...)
+report_invalid_record(XLogReaderState *state, const char *fmt, ...)
{
va_list args;
XLogRecPtr start_lsn,
XLogRecPtr end_lsn);
pg_noreturn static void manifest_report_error(JsonManifestParseContext *context,
- const char *fmt,...)
+ const char *fmt, ...)
pg_attribute_printf(2, 3);
static int compare_block_numbers(const void *a, const void *b);
* manifest.
*/
static void
-manifest_report_error(JsonManifestParseContext *context, const char *fmt,...)
+manifest_report_error(JsonManifestParseContext *context, const char *fmt, ...)
{
StringInfoData errbuf;
* Error-reporting callback for use with CreateBlockRefTableReader.
*/
void
-ReportWalSummaryError(void *callback_arg, char *fmt,...)
+ReportWalSummaryError(void *callback_arg, char *fmt, ...)
{
StringInfoData buf;
va_list ap;
}
-/* ****************************************************************
+/*
+ * ****************************************************************
* Exported routines for examining a user's privileges for various objects
*
* See aclmask() for a description of the common API for these functions.
/* ----------------------------------------------------------------
* XXX END OF UGLY HARD CODED BADNESS XXX
- * ---------------------------------------------------------------- */
+ * ----------------------------------------------------------------
+ */
/* ----------------------------------------------------------------
}
-/*==========================================================================
+/*
+ * ==========================================================================
*
* Code below this point represents the "standard" type-specific statistics
* analysis algorithms. This code can be replaced on a per-data-type basis
* root_rel can be set to the root table of rel if rel is a partition
* table so that we can send tuples in root_rel's rowtype, which might
* differ from individual partitions.
-*/
+ */
static void
CopyRelationTo(CopyToState cstate, Relation rel, Relation root_rel, uint64 *processed)
{
*
* Wrapper around find_coercion_pathway() for ATAddForeignKeyConstraint().
* Caller has equal regard for binary coercibility and for an exact match.
-*/
+ */
static CoercionPathType
findFkeyCast(Oid targetTypeId, Oid sourceTypeId, Oid *funcid)
{
*
*-------------------------------------------------------------------------
*/
-/* INTERFACE ROUTINES
+/*
+ * INTERFACE ROUTINES
* ExecInitAppend - initialize the append node
* ExecAppend - retrieve the next tuple from the node
* ExecEndAppend - shut down the append node
*
*-------------------------------------------------------------------------
*/
-/* INTERFACE ROUTINES
+/*
+ * INTERFACE ROUTINES
* ExecInitBitmapAnd - initialize the BitmapAnd node
* MultiExecBitmapAnd - retrieve the result bitmap from the node
* ExecEndBitmapAnd - shut down the BitmapAnd node
*
*-------------------------------------------------------------------------
*/
-/* INTERFACE ROUTINES
+/*
+ * INTERFACE ROUTINES
* ExecInitBitmapOr - initialize the BitmapOr node
* MultiExecBitmapOr - retrieve the result bitmap from the node
* ExecEndBitmapOr - shut down the BitmapOr node
*
*-------------------------------------------------------------------------
*/
-/* INTERFACE ROUTINES
+/*
+ * INTERFACE ROUTINES
* ExecInitMergeAppend - initialize the MergeAppend node
* ExecMergeAppend - retrieve the next tuple from the node
* ExecEndMergeAppend - shut down the MergeAppend node
*
*-------------------------------------------------------------------------
*/
-/* INTERFACE ROUTINES
+/*
+ * INTERFACE ROUTINES
* ExecInitModifyTable - initialize the ModifyTable node
* ExecModifyTable - retrieve the next tuple from the node
* ExecEndModifyTable - shut down the ModifyTable node
return true;
}
-/* gettuple_eval_partition
+/*
+ * gettuple_eval_partition
* get tuple in a partition and evaluate the window function's argument
* expression on it.
*/
* expand notnull_info if necessary.
* pos: not null info position
* argno: argument number
-*/
+ */
static void
grow_notnull_info(WindowObject winobj, int64 pos, int argno)
{
static RBTNode sentinel =
{
- .color = RBTBLACK,.left = RBTNIL,.right = RBTNIL,.parent = NULL
+ .color = RBTBLACK, .left = RBTNIL, .right = RBTNIL, .parent = NULL
};
{
uint32 status;
const char *hostname;
-} HostCacheEntry;
+} HostCacheEntry;
static uint32 host_cache_pointer(const char *key);
#define SH_PREFIX host_cache
#define SH_ELEMENT_TYPE HostCacheEntry
}
/* --------------------------------
-
+ *
* pq_beginmessage_reuse - initialize for sending a message, reuse buffer
*
* This requires the buffer to be allocated in a sufficiently long-lived
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* this is adopted from D. Whitley's Genitor algorithm */
#include "postgres.h"
#include "optimizer/geqo_copy.h"
-/* geqo_copy
+/*
+ * geqo_copy
*
* copies one gene to another
*
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* the cx algorithm is adopted from Genitor : */
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"
-/* cx
+/*
+ * cx
*
* cycle crossover
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* the edge recombination algorithm is adopted from Genitor : */
static Gene edge_failure(PlannerInfo *root, Gene *gene, int index, Edge *edge_table, int num_gene);
-/* alloc_edge_table
+/*
+ * alloc_edge_table
*
* allocate memory for edge table
*
return edge_table;
}
-/* free_edge_table
+/*
+ * free_edge_table
*
* deallocate memory of edge table
*
pfree(edge_table);
}
-/* gimme_edge_table
+/*
+ * gimme_edge_table
*
* fills a data structure which represents the set of explicit
* edges between points in the (2) input genes
return ((float) (edge_total * 2) / (float) num_gene);
}
-/* gimme_edge
+/*
+ * gimme_edge
*
* registers edge from city1 to city2 in input edge table
*
return 1;
}
-/* gimme_tour
+/*
+ * gimme_tour
*
* creates a new tour using edges from the edge table.
* priority is given to "shared" edges (i.e. edges which
return edge_failures;
}
-/* remove_gene
+/*
+ * remove_gene
*
* removes input gene from edge_table.
* input edge is used
}
}
-/* gimme_gene
+/*
+ * gimme_gene
*
* priority is given to "shared" edges
* (i.e. edges which both genes possess)
return 0; /* to keep the compiler quiet */
}
-/* edge_failure
+/*
+ * edge_failure
*
* routine for handling edge failure
*
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#include "postgres.h"
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#include "postgres.h"
return cumulative;
}
-/* print_pool
+/*
+ * print_pool
*/
void
print_pool(FILE *fp, Pool *pool, int start, int stop)
fflush(fp);
}
-/* print_gen
+/*
+ * print_gen
*
* printout for chromosome: best, worst, mean, average
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* this is adopted from Genitor : */
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* the ox algorithm is adopted from Genitor : */
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"
-/* ox1
+/*
+ * ox1
*
* position crossover
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* the ox algorithm is adopted from Genitor : */
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"
-/* ox2
+/*
+ * ox2
*
* position crossover
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* the pmx algorithm is adopted from Genitor : */
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"
-/* pmx
+/*
+ * pmx
*
* partially matched crossover
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
return -1;
}
-/* alloc_chromo
+/*
+ * alloc_chromo
* allocates a chromosome and string space
*/
Chromosome *
return chromo;
}
-/* free_chromo
+/*
+ * free_chromo
* deallocates a chromosome and string space
*/
void
pfree(chromo);
}
-/* spread_chromo
+/*
+ * spread_chromo
* inserts a new chromosome into the pool, displacing worst gene in pool
* assumes best->worst = smallest->largest
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* the px algorithm is adopted from Genitor : */
#include "optimizer/geqo_random.h"
#include "optimizer/geqo_recombination.h"
-/* px
+/*
+ * px
*
* position crossover
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
/* city table is used in these recombination methods: */
#if defined(CX) || defined(PX) || defined(OX1) || defined(OX2)
-/* alloc_city_table
+/*
+ * alloc_city_table
*
* allocate memory for city table
*/
return city_table;
}
-/* free_city_table
+/*
+ * free_city_table
*
* deallocate memory of city table
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* this is adopted from D. Whitley's Genitor algorithm */
return colcount;
}
-/* transformJoinUsingClause()
+/*
+ * transformJoinUsingClause()
* Build a complete ON clause from a partially-transformed USING list.
* We are given lists of nodes representing left and right match columns.
* Result is a transformed qualification expression.
return result;
}
-/* transformJoinOnClause()
+/*
+ * transformJoinOnClause()
* Transform the qual conditions for JOIN/ON.
* Result is a transformed qualification expression.
*/
}
-/* TypeCategory()
+/*
+ * TypeCategory()
* Assign a category to the specified type OID.
*
* NB: this must not return TYPCATEGORY_INVALID.
}
-/* IsPreferredType()
+/*
+ * IsPreferredType()
* Check if this type is a preferred type for the given category.
*
* If category is TYPCATEGORY_INVALID, then we'll return true for preferred
}
-/* IsBinaryCoercible()
+/*
+ * IsBinaryCoercible()
* Check if srctype is binary-coercible to targettype.
*
* This notion allows us to cheat and directly exchange values without
return IsBinaryCoercibleWithCast(srctype, targettype, &castoid);
}
-/* IsBinaryCoercibleWithCast()
+/*
+ * IsBinaryCoercibleWithCast()
* Check if srctype is binary-coercible to targettype.
*
* This variant also returns the OID of the pg_cast entry if one is involved.
}
-/* func_match_argtypes()
+/*
+ * func_match_argtypes()
*
* Given a list of candidate functions (having the right name and number
* of arguments) and an array of input datatype OIDs, produce a shortlist of
} /* func_match_argtypes() */
-/* func_select_candidate()
+/*
+ * func_select_candidate()
* Given the input argtype array and more than one candidate
* for the function, attempt to resolve the conflict.
*
} /* func_select_candidate() */
-/* func_get_detail()
+/*
+ * func_get_detail()
*
* Find the named function in the system catalogs.
*
}
-/* binary_oper_exact()
+/*
+ * binary_oper_exact()
* Check for an "exact" match to the specified operand types.
*
* If one operand is an unknown literal, assume it should be taken to be
}
-/* oper_select_candidate()
+/*
+ * oper_select_candidate()
* Given the input argtype array and one or more candidates
* for the operator, attempt to resolve the conflict.
*
}
-/* oper() -- search for a binary operator
+/*
+ * oper() -- search for a binary operator
* Given operator name, types of arg1 and arg2, return oper struct.
*
* IMPORTANT: the returned operator (if any) is only promised to be
return (Operator) tup;
}
-/* compatible_oper()
+/*
+ * compatible_oper()
* given an opname and input datatypes, find a compatible binary operator
*
* This is tighter than oper() because it will not return an operator that
return (Operator) NULL;
}
-/* compatible_oper_opid() -- get OID of a binary operator
+/*
+ * compatible_oper_opid() -- get OID of a binary operator
*
* This is a convenience routine that extracts only the operator OID
* from the result of compatible_oper(). InvalidOid is returned if the
}
-/* left_oper() -- search for a unary left operator (prefix operator)
+/*
+ * left_oper() -- search for a unary left operator (prefix operator)
* Given operator name and type of arg, return oper struct.
*
* IMPORTANT: the returned operator (if any) is only promised to be
return InvalidAttrNumber;
}
-/* specialAttNum()
+/*
+ * specialAttNum()
*
* Check attribute name to see if it is "special", e.g. "xmin".
* - thomas 2000-02-07
* 3. In case new partitions don't contain the DEFAULT partition and the
* partitioned table does not have the DEFAULT partition, the following
* should be true: the sum of the bounds of new partitions should be equal
- & to the bound of the split partition.
+ * to the bound of the split partition.
*
* parent: partitioned table
* splitPartOid: split partition Oid
}
-/* Console control handler will execute on a thread created
- by the OS at the time of invocation */
+/*
+ * Console control handler will execute on a thread created
+ * by the OS at the time of invocation
+ */
static BOOL WINAPI
pg_console_handler(DWORD dwCtrlType)
{
static HTAB *ParallelApplyTxnHash = NULL;
/*
-* A list (pool) of active parallel apply workers. The information for
-* the new worker is added to the list after successfully launching it. The
-* list entry is removed if there are already enough workers in the worker
-* pool at the end of the transaction. For more information about the worker
-* pool, see comments atop this file.
+ * A list (pool) of active parallel apply workers. The information for
+ * the new worker is added to the list after successfully launching it. The
+ * list entry is removed if there are already enough workers in the worker
+ * pool at the end of the transaction. For more information about the worker
+ * pool, see comments atop this file.
*/
static List *ParallelApplyWorkerPool = NIL;
* This is used to send launcher signal to stop sleeping and process the
* subscriptions when current transaction commits. Should be used when new
* tuple was added to the pg_subscription catalog.
-*/
+ */
void
ApplyLauncherWakeupAtCommit(void)
{
* what we need.
*/
if (!binary &&
- ctx->options.output_type !=OUTPUT_PLUGIN_TEXTUAL_OUTPUT)
+ ctx->options.output_type != OUTPUT_PLUGIN_TEXTUAL_OUTPUT)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("logical decoding output plugin \"%s\" produces binary output, but function \"%s\" expects textual data",
* with PG_TEMP_FILE_PREFIX, so that they can be identified as temporary and
* deleted at startup by RemovePgTempFiles(). Further subdirectories below
* that do not need any particular prefix.
-*/
+ */
void
PathNameCreateTemporaryDir(const char *basedir, const char *directory)
{
entry->dsa.handle != DSA_HANDLE_INVALID)
vals[2] = Int64GetDatum(dsa_get_total_size_from_handle(entry->dsa.handle));
else if (entry->type == DSMR_ENTRY_TYPE_DSH &&
- entry->dsh.dsa_handle !=DSA_HANDLE_INVALID)
+ entry->dsh.dsa_handle != DSA_HANDLE_INVALID)
vals[2] = Int64GetDatum(dsa_get_total_size_from_handle(entry->dsh.dsa_handle));
else
nulls[2] = true;
}
/*
-* IO statistics are not collected for all BackendTypes.
-*
-* The following BackendTypes do not participate in the cumulative stats
-* subsystem or do not perform IO on which we currently track:
-* - Dead-end backend because it is not connected to shared memory and
-* doesn't do any IO
-* - Syslogger because it is not connected to shared memory
-* - Archiver because most relevant archiving IO is delegated to a
-* specialized command or module
-*
-* Function returns true if BackendType participates in the cumulative stats
-* subsystem for IO and false if it does not.
-*
-* When adding a new BackendType, also consider adding relevant restrictions to
-* pgstat_tracks_io_object() and pgstat_tracks_io_op().
-*/
+ * IO statistics are not collected for all BackendTypes.
+ *
+ * The following BackendTypes do not participate in the cumulative stats
+ * subsystem or do not perform IO on which we currently track:
+ * - Dead-end backend because it is not connected to shared memory and
+ * doesn't do any IO
+ * - Syslogger because it is not connected to shared memory
+ * - Archiver because most relevant archiving IO is delegated to a
+ * specialized command or module
+ *
+ * Function returns true if BackendType participates in the cumulative stats
+ * subsystem for IO and false if it does not.
+ *
+ * When adding a new BackendType, also consider adding relevant restrictions to
+ * pgstat_tracks_io_object() and pgstat_tracks_io_op().
+ */
bool
pgstat_tracks_io_bktype(BackendType bktype)
{
return c / i;
}
-/* cash_in()
+/*
+ * cash_in()
* Convert a string to a cash data type.
* Format is [$]###[,]###[.##]
* Examples: 123.45 $123.45 $123,456.78
}
-/* cash_out()
+/*
+ * cash_out()
* Function to convert cash to a dollars and cents representation, using
* the lc_monetary locale's formatting.
*/
}
-/* cash_pl()
+/*
+ * cash_pl()
* Add two cash values.
*/
Datum
}
-/* cash_mi()
+/*
+ * cash_mi()
* Subtract two cash values.
*/
Datum
}
-/* cash_div_cash()
+/*
+ * cash_div_cash()
* Divide cash by cash, returning float8.
*/
Datum
}
-/* cash_mul_flt8()
+/*
+ * cash_mul_flt8()
* Multiply cash by float8.
*/
Datum
}
-/* flt8_mul_cash()
+/*
+ * flt8_mul_cash()
* Multiply float8 by cash.
*/
Datum
}
-/* cash_div_flt8()
+/*
+ * cash_div_flt8()
* Divide cash by float8.
*/
Datum
}
-/* cash_mul_flt4()
+/*
+ * cash_mul_flt4()
* Multiply cash by float4.
*/
Datum
}
-/* flt4_mul_cash()
+/*
+ * flt4_mul_cash()
* Multiply float4 by cash.
*/
Datum
}
-/* cash_div_flt4()
+/*
+ * cash_div_flt4()
* Divide cash by float4.
*
*/
}
-/* cash_mul_int8()
+/*
+ * cash_mul_int8()
* Multiply cash by int8.
*/
Datum
}
-/* int8_mul_cash()
+/*
+ * int8_mul_cash()
* Multiply int8 by cash.
*/
Datum
PG_RETURN_CASH(cash_mul_int64(c, i));
}
-/* cash_div_int8()
+/*
+ * cash_div_int8()
* Divide cash by 8-byte integer.
*/
Datum
}
-/* cash_mul_int4()
+/*
+ * cash_mul_int4()
* Multiply cash by int4.
*/
Datum
}
-/* int4_mul_cash()
+/*
+ * int4_mul_cash()
* Multiply int4 by cash.
*/
Datum
}
-/* cash_div_int4()
+/*
+ * cash_div_int4()
* Divide cash by 4-byte integer.
*
*/
}
-/* cash_mul_int2()
+/*
+ * cash_mul_int2()
* Multiply cash by int2.
*/
Datum
PG_RETURN_CASH(cash_mul_int64(c, (int64) s));
}
-/* int2_mul_cash()
+/*
+ * int2_mul_cash()
* Multiply int2 by cash.
*/
Datum
PG_RETURN_CASH(cash_mul_int64(c, (int64) s));
}
-/* cash_div_int2()
+/*
+ * cash_div_int2()
* Divide cash by int2.
*
*/
PG_RETURN_CASH(cash_div_int64(c, (int64) s));
}
-/* cashlarger()
+/*
+ * cashlarger()
* Return larger of two cash values.
*/
Datum
PG_RETURN_CASH(result);
}
-/* cashsmaller()
+/*
+ * cashsmaller()
* Return smaller of two cash values.
*/
Datum
PG_RETURN_CASH(result);
}
-/* cash_words()
+/*
+ * cash_words()
* This converts an int4 as well but to a representation using words
* Obviously way North American centric - sorry
*/
}
-/* cash_numeric()
+/*
+ * cash_numeric()
* Convert cash to numeric.
*/
Datum
PG_RETURN_DATUM(result);
}
-/* numeric_cash()
+/*
+ * numeric_cash()
* Convert numeric to cash.
*/
Datum
PG_RETURN_CASH(result);
}
-/* int4_cash()
+/*
+ * int4_cash()
* Convert int4 (int) to cash
*/
Datum
PG_RETURN_CASH(result);
}
-/* int8_cash()
+/*
+ * int8_cash()
* Convert int8 (bigint) to cash
*/
Datum
*****************************************************************************/
-/* date_in()
+/*
+ * date_in()
* Given date text string, convert to internal date format.
*/
Datum
PG_RETURN_DATEADT(date);
}
-/* date_out()
+/*
+ * date_out()
* Given internal format date, convert to text string.
*/
Datum
PG_RETURN_DATEADT((dateVal1 < dateVal2) ? dateVal1 : dateVal2);
}
-/* Compute difference between two dates in days.
+/*
+ * Compute difference between two dates in days.
*/
Datum
date_mi(PG_FUNCTION_ARGS)
PG_RETURN_INT32((int32) (dateVal1 - dateVal2));
}
-/* Add a number of days to a date, giving a new date.
+/*
+ * Add a number of days to a date, giving a new date.
* Must handle both positive and negative numbers of days.
*/
Datum
PG_RETURN_DATEADT(result);
}
-/* Subtract a number of days from a date, giving a new date.
+/*
+ * Subtract a number of days from a date, giving a new date.
*/
Datum
date_mii(PG_FUNCTION_ARGS)
}
-/* extract_date()
+/*
+ * extract_date()
* Extract specified field from date type.
*/
Datum
}
-/* Add an interval to a date, giving a new date.
+/*
+ * Add an interval to a date, giving a new date.
* Must handle both positive and negative intervals.
*
* We implement this by promoting the date to timestamp (without time zone)
PointerGetDatum(span));
}
-/* Subtract an interval from a date, giving a new date.
+/*
+ * Subtract an interval from a date, giving a new date.
* Must handle both positive and negative intervals.
*
* We implement this by promoting the date to timestamp (without time zone)
PointerGetDatum(span));
}
-/* date_timestamp()
+/*
+ * date_timestamp()
* Convert date to timestamp data type.
*/
Datum
PG_RETURN_TIMESTAMP(result);
}
-/* timestamp_date()
+/*
+ * timestamp_date()
* Convert timestamp to date data type.
*/
Datum
}
-/* date_timestamptz()
+/*
+ * date_timestamptz()
* Convert date to timestamp with time zone data type.
*/
Datum
}
-/* timestamptz_date()
+/*
+ * timestamptz_date()
* Convert timestamp with time zone to date data type.
*/
Datum
PG_RETURN_TIMEADT(result);
}
-/* tm2time()
+/*
+ * tm2time()
* Convert a tm structure to a time data type.
*/
int
return 0;
}
-/* time_overflows()
+/*
+ * time_overflows()
* Check to see if a broken-down time-of-day is out of range.
*/
bool
return false;
}
-/* float_time_overflows()
+/*
+ * float_time_overflows()
* Same, when we have seconds + fractional seconds as one "double" value.
*/
bool
}
-/* time2tm()
+/*
+ * time2tm()
* Convert time data type to POSIX time structure.
*
* Note that only the hour/min/sec/fractional-sec fields are filled in.
}
-/* time_support()
+/*
+ * time_support()
*
* Planner support function for the time_scale() and timetz_scale()
* length coercion functions (we need not distinguish them here).
PG_RETURN_POINTER(ret);
}
-/* time_scale()
+/*
+ * time_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
*/
PG_RETURN_TIMEADT(result);
}
-/* AdjustTimeForTypmod()
+/*
+ * AdjustTimeForTypmod()
* Force the precision of the time value to a specified value.
* Uses *exactly* the same code as in AdjustTimestampForTypmod()
* but we make a separate copy because those types do not
PG_RETURN_TIMEADT((time1 < time2) ? time1 : time2);
}
-/* overlaps_time() --- implements the SQL OVERLAPS operator.
+/*
+ * overlaps_time() --- implements the SQL OVERLAPS operator.
*
* Algorithm is per SQL spec. This is much harder than you'd think
* because the spec requires us to deliver a non-null answer in some cases
#undef TIMEADT_LT
}
-/* timestamp_time()
+/*
+ * timestamp_time()
* Convert timestamp to time data type.
*/
Datum
PG_RETURN_TIMEADT(result);
}
-/* timestamptz_time()
+/*
+ * timestamptz_time()
* Convert timestamptz to time data type.
*/
Datum
PG_RETURN_TIMEADT(result);
}
-/* datetime_timestamp()
+/*
+ * datetime_timestamp()
* Convert date and time to timestamp data type.
*/
Datum
PG_RETURN_TIMESTAMP(result);
}
-/* time_interval()
+/*
+ * time_interval()
* Convert time to interval data type.
*/
Datum
PG_RETURN_INTERVAL_P(result);
}
-/* interval_time()
+/*
+ * interval_time()
* Convert interval to time data type.
*
* This is defined as producing the fractional-day portion of the interval.
PG_RETURN_TIMEADT(result);
}
-/* time_mi_time()
+/*
+ * time_mi_time()
* Subtract two times to produce an interval.
*/
Datum
PG_RETURN_INTERVAL_P(result);
}
-/* time_pl_interval()
+/*
+ * time_pl_interval()
* Add interval to time.
*/
Datum
PG_RETURN_TIMEADT(result);
}
-/* time_mi_interval()
+/*
+ * time_mi_interval()
* Subtract interval from time.
*/
Datum
}
-/* time_part() and extract_time()
+/*
+ * time_part() and extract_time()
* Extract specified field from time type.
*/
static Datum
* Time With Time Zone ADT
*****************************************************************************/
-/* tm2timetz()
+/*
+ * tm2timetz()
* Convert a tm structure to a time data type.
*/
int
}
-/* timetz2tm()
+/*
+ * timetz2tm()
* Convert TIME WITH TIME ZONE data type to POSIX time structure.
*/
int
return 0;
}
-/* timetz_scale()
+/*
+ * timetz_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
*/
PG_RETURN_TIMETZADT_P(result);
}
-/* timetz_pl_interval()
+/*
+ * timetz_pl_interval()
* Add interval to timetz.
*/
Datum
PG_RETURN_TIMETZADT_P(result);
}
-/* timetz_mi_interval()
+/*
+ * timetz_mi_interval()
* Subtract interval from timetz.
*/
Datum
PG_RETURN_BOOL(timetz_cmp_internal(val, &sum) >= 0);
}
-/* overlaps_timetz() --- implements the SQL OVERLAPS operator.
+/*
+ * overlaps_timetz() --- implements the SQL OVERLAPS operator.
*
* Algorithm is per SQL spec. This is much harder than you'd think
* because the spec requires us to deliver a non-null answer in some cases
}
-/* timestamptz_timetz()
+/*
+ * timestamptz_timetz()
* Convert timestamp to timetz data type.
*/
Datum
}
-/* datetimetz_timestamptz()
+/*
+ * datetimetz_timestamptz()
* Convert date and timetz to timestamp with time zone data type.
* Timestamp is stored in GMT, so add the time zone
* stored with the timetz to the result.
}
-/* timetz_part() and extract_timetz()
+/*
+ * timetz_part() and extract_timetz()
* Extract specified field from time type.
*/
static Datum
return timetz_part_common(fcinfo, true);
}
-/* timetz_zone()
+/*
+ * timetz_zone()
* Encode time with time zone type with specified time zone.
* Applies DST rules as of the transaction start time.
*/
PG_RETURN_TIMETZADT_P(result);
}
-/* timetz_izone()
+/*
+ * timetz_izone()
* Encode time with time zone type with specified time interval as time zone.
*/
Datum
PG_RETURN_TIMETZADT_P(result);
}
-/* timetz_at_local()
+/*
+ * timetz_at_local()
*
* Unlike for timestamp[tz]_at_local, the type for timetz does not flip between
* time with/without time zone, so we cannot just call the conversion function.
}
-/* ParseDateTime()
+/*
+ * ParseDateTime()
* Break string into tokens based on a date/time context.
* Returns 0 if successful, DTERR code if bogus input detected.
*
}
-/* DecodeDateTime()
+/*
+ * DecodeDateTime()
* Interpret previously parsed fields for general date and time.
* Return 0 if full date, 1 if only time, and negative DTERR code if problems.
* (Currently, all callers treat 1 as an error return too.)
}
-/* DetermineTimeZoneOffset()
+/*
+ * DetermineTimeZoneOffset()
*
* Given a struct pg_tm in which tm_year, tm_mon, tm_mday, tm_hour, tm_min,
* and tm_sec fields are set, and a zic-style time zone definition, determine
}
-/* DetermineTimeZoneOffsetInternal()
+/*
+ * DetermineTimeZoneOffsetInternal()
*
* As above, but also return the actual UTC time imputed to the date/time
* into *tp.
}
-/* DetermineTimeZoneAbbrevOffset()
+/*
+ * DetermineTimeZoneAbbrevOffset()
*
* Determine the GMT offset and DST flag to be attributed to a dynamic
* time zone abbreviation, that is one whose meaning has changed over time.
}
-/* DetermineTimeZoneAbbrevOffsetTS()
+/*
+ * DetermineTimeZoneAbbrevOffsetTS()
*
* As above but the probe time is specified as a TimestampTz (hence, UTC time),
* and DST status is returned into *isdst rather than into tm->tm_isdst.
}
-/* DetermineTimeZoneAbbrevOffsetInternal()
+/*
+ * DetermineTimeZoneAbbrevOffsetInternal()
*
* Workhorse for above two functions: work from a pg_time_t probe instant.
* On success, return GMT offset and DST status into *offset and *isdst.
}
-/* TimeZoneAbbrevIsKnown()
+/*
+ * TimeZoneAbbrevIsKnown()
*
* Detect whether the given string is a time zone abbreviation that's known
* in the specified TZDB timezone, and if so whether it's fixed or varying
}
-/* DecodeTimeOnly()
+/*
+ * DecodeTimeOnly()
* Interpret parsed string as time fields only.
* Returns 0 if successful, DTERR code if bogus input detected.
*
return 0;
}
-/* DecodeDate()
+/*
+ * DecodeDate()
* Decode date string which includes delimiters.
* Return 0 if okay, a DTERR code if not.
*
return 0;
}
-/* ValidateDate()
+/*
+ * ValidateDate()
* Check valid year/month/day values, handle BC and DOY cases
* Return 0 if okay, a DTERR code if not.
*/
}
-/* DecodeTimeCommon()
+/*
+ * DecodeTimeCommon()
* Decode time string which includes delimiters.
* Return 0 if okay, a DTERR code if not.
* tmask and itm are output parameters.
return 0;
}
-/* DecodeTime()
+/*
+ * DecodeTime()
* Decode time string which includes delimiters.
* Return 0 if okay, a DTERR code if not.
*
return 0;
}
-/* DecodeTimeForInterval()
+/*
+ * DecodeTimeForInterval()
* Decode time string which includes delimiters.
* Return 0 if okay, a DTERR code if not.
*
}
-/* DecodeNumber()
+/*
+ * DecodeNumber()
* Interpret plain numeric field as a date value in context.
* Return 0 if okay, a DTERR code if not.
*/
}
-/* DecodeNumberField()
+/*
+ * DecodeNumberField()
* Interpret numeric string as a concatenated date or time field.
* Return a DTK token (>= 0) if successful, a DTERR code (< 0) if not.
*
}
-/* DecodeTimezone()
+/*
+ * DecodeTimezone()
* Interpret string as a numeric timezone.
*
* Return 0 if okay (and set *tzp), a DTERR code if not okay.
}
-/* DecodeTimezoneAbbrev()
+/*
+ * DecodeTimezoneAbbrev()
* Interpret string as a timezone abbreviation, if possible.
*
* Sets *ftype to an abbreviation type (TZ, DTZ, or DYNTZ), or UNKNOWN_FIELD if
}
-/* DecodeSpecial()
+/*
+ * DecodeSpecial()
* Decode text string using lookup table.
*
* Recognizes the keywords listed in datetktbl.
}
-/* DecodeTimezoneName()
+/*
+ * DecodeTimezoneName()
* Interpret string as a timezone abbreviation or name.
* Throw error if the name is not recognized.
*
}
}
-/* DecodeTimezoneNameToTz()
+/*
+ * DecodeTimezoneNameToTz()
* Interpret string as a timezone abbreviation or name.
* Throw error if the name is not recognized.
*
return result;
}
-/* DecodeTimezoneAbbrevPrefix()
+/*
+ * DecodeTimezoneAbbrevPrefix()
* Interpret prefix of string as a timezone abbreviation, if possible.
*
* This has roughly the same functionality as DecodeTimezoneAbbrev(),
}
-/* ClearPgItmIn
+/*
+ * ClearPgItmIn
*
* Zero out a pg_itm_in
*/
}
-/* DecodeInterval()
+/*
+ * DecodeInterval()
* Interpret previously parsed fields for general time interval.
* Returns 0 if successful, DTERR code if bogus input detected.
* dtype and itm_in are output parameters.
}
-/* DecodeISO8601Interval()
+/*
+ * DecodeISO8601Interval()
* Decode an ISO 8601 time interval of the "format with designators"
* (section 4.4.3.2) or "alternative format" (section 4.4.3.3)
* Examples: P1D for 1 day
}
-/* DecodeUnits()
+/*
+ * DecodeUnits()
* Decode text string using lookup table.
*
* This routine recognizes keywords associated with time interval units.
}
}
-/* datebsearch()
+/*
+ * datebsearch()
* Binary search -- from Knuth (6.2.1) Algorithm B. Special case like this
* is WAY faster than the generic bsearch().
*/
return NULL;
}
-/* EncodeTimezone()
+/*
+ * EncodeTimezone()
* Copies representation of a numeric timezone offset to str.
*
* Returns a pointer to the new end of string. No NUL terminator is put
return str;
}
-/* EncodeDateOnly()
+/*
+ * EncodeDateOnly()
* Encode date as local time.
*/
void
}
-/* EncodeTimeOnly()
+/*
+ * EncodeTimeOnly()
* Encode time fields only.
*
* tm and fsec are the value to encode, print_tz determines whether to include
}
-/* EncodeDateTime()
+/*
+ * EncodeDateTime()
* Encode date and time interpreted as local time.
*
* tm and fsec are the value to encode, print_tz determines whether to include
}
-/* EncodeInterval()
+/*
+ * EncodeInterval()
* Interpret time structure as a delta time and convert to string.
*
* Support "traditional Postgres" and ISO-8601 styles.
static void parse_ddl_options(FunctionCallInfo fcinfo, int variadic_start,
DdlOption *opts, int nopts);
static void append_ddl_option(StringInfo buf, bool pretty, int indent,
- const char *fmt,...)
+ const char *fmt, ...)
pg_attribute_printf(4, 5);
static void append_guc_value(StringInfo buf, const char *name,
const char *value);
*/
static void
append_ddl_option(StringInfo buf, bool pretty, int indent,
- const char *fmt,...)
+ const char *fmt, ...)
{
if (pretty)
{
*/
static const int DCH_index[KeyWord_INDEX_SIZE] = {
/*
-0 1 2 3 4 5 6 7 8 9
-*/
+ * 0 1 2 3 4 5 6 7 8 9
+ */
/*---- first 0..31 chars are skipped ----*/
-1, -1, -1, -1, -1, -1, -1, -1,
*/
static const int NUM_index[KeyWord_INDEX_SIZE] = {
/*
-0 1 2 3 4 5 6 7 8 9
-*/
+ * 0 1 2 3 4 5 6 7 8 9
+ */
/*---- first 0..31 chars are skipped ----*/
-1, -1, -1, -1, -1, -1, -1, -1,
* Formatting and conversion routines.
*---------------------------------------------------------*/
-/* box_in - convert a string to internal form.
+/*
+ * box_in - convert a string to internal form.
*
* External format: (two corners of box)
* "(f8, f8), (f8, f8)"
PG_RETURN_BOX_P(box);
}
-/* box_out - convert a box to external form.
+/*
+ * box_out - convert a box to external form.
*/
Datum
box_out(PG_FUNCTION_ARGS)
}
-/* box_construct - fill in a new box.
+/*
+ * box_construct - fill in a new box.
*/
static inline void
box_construct(BOX *result, Point *pt1, Point *pt2)
* <, >, <=, >=, and == are based on box area.
*---------------------------------------------------------*/
-/* box_same - are two boxes identical?
+/*
+ * box_same - are two boxes identical?
*/
Datum
box_same(PG_FUNCTION_ARGS)
point_eq_point(&box1->low, &box2->low));
}
-/* box_overlap - does box1 overlap box2?
+/*
+ * box_overlap - does box1 overlap box2?
*/
Datum
box_overlap(PG_FUNCTION_ARGS)
FPle(box2->low.y, box1->high.y));
}
-/* box_left - is box1 strictly left of box2?
+/*
+ * box_left - is box1 strictly left of box2?
*/
Datum
box_left(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(FPlt(box1->high.x, box2->low.x));
}
-/* box_overleft - is the right edge of box1 at or left of
+/*
+ * box_overleft - is the right edge of box1 at or left of
* the right edge of box2?
*
* This is "less than or equal" for the end of a time range,
PG_RETURN_BOOL(FPle(box1->high.x, box2->high.x));
}
-/* box_right - is box1 strictly right of box2?
+/*
+ * box_right - is box1 strictly right of box2?
*/
Datum
box_right(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(FPgt(box1->low.x, box2->high.x));
}
-/* box_overright - is the left edge of box1 at or right of
+/*
+ * box_overright - is the left edge of box1 at or right of
* the left edge of box2?
*
* This is "greater than or equal" for time ranges, when time ranges
PG_RETURN_BOOL(FPge(box1->low.x, box2->low.x));
}
-/* box_below - is box1 strictly below box2?
+/*
+ * box_below - is box1 strictly below box2?
*/
Datum
box_below(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(FPlt(box1->high.y, box2->low.y));
}
-/* box_overbelow - is the upper edge of box1 at or below
+/*
+ * box_overbelow - is the upper edge of box1 at or below
* the upper edge of box2?
*/
Datum
PG_RETURN_BOOL(FPle(box1->high.y, box2->high.y));
}
-/* box_above - is box1 strictly above box2?
+/*
+ * box_above - is box1 strictly above box2?
*/
Datum
box_above(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(FPgt(box1->low.y, box2->high.y));
}
-/* box_overabove - is the lower edge of box1 at or above
+/*
+ * box_overabove - is the lower edge of box1 at or above
* the lower edge of box2?
*/
Datum
PG_RETURN_BOOL(FPge(box1->low.y, box2->low.y));
}
-/* box_contained - is box1 contained by box2?
+/*
+ * box_contained - is box1 contained by box2?
*/
Datum
box_contained(PG_FUNCTION_ARGS)
PG_RETURN_BOOL(box_contain_box(box2, box1));
}
-/* box_contain - does box1 contain box2?
+/*
+ * box_contain - does box1 contain box2?
*/
Datum
box_contain(PG_FUNCTION_ARGS)
}
-/* box_positionop -
+/*
+ * box_positionop -
* is box1 entirely {above,below} box2?
*
* box_below_eq and box_above_eq are obsolete versions that (probably
}
-/* box_relop - is area(box1) relop area(box2), within
+/*
+ * box_relop - is area(box1) relop area(box2), within
* our accuracy constraint?
*/
Datum
* "Arithmetic" operators on boxes.
*---------------------------------------------------------*/
-/* box_area - returns the area of the box.
+/*
+ * box_area - returns the area of the box.
*/
Datum
box_area(PG_FUNCTION_ARGS)
}
-/* box_width - returns the width of the box
+/*
+ * box_width - returns the width of the box
* (horizontal magnitude).
*/
Datum
}
-/* box_height - returns the height of the box
+/*
+ * box_height - returns the height of the box
* (vertical magnitude).
*/
Datum
}
-/* box_distance - returns the distance between the
+/*
+ * box_distance - returns the distance between the
* center points of two boxes.
*/
Datum
}
-/* box_center - returns the center point of the box.
+/*
+ * box_center - returns the center point of the box.
*/
Datum
box_center(PG_FUNCTION_ARGS)
}
-/* box_ar - returns the area of the box.
+/*
+ * box_ar - returns the area of the box.
*/
static float8
box_ar(BOX *box)
}
-/* box_cn - stores the centerpoint of the box into *center.
+/*
+ * box_cn - stores the centerpoint of the box into *center.
*/
static void
box_cn(Point *center, BOX *box, Node *escontext)
return;
}
-/* box_wd - returns the width (length) of the box
+/*
+ * box_wd - returns the width (length) of the box
* (horizontal magnitude).
*/
static float8
}
-/* box_ht - returns the height of the box
+/*
+ * box_ht - returns the height of the box
* (vertical magnitude).
*/
static float8
* Funky operations.
*---------------------------------------------------------*/
-/* box_intersect -
+/*
+ * box_intersect -
* returns the overlapping portion of two boxes,
* or NULL if they do not intersect.
*/
}
-/* box_diagonal -
+/*
+ * box_diagonal -
* returns a line segment which happens to be the
* positive-slope diagonal of "box".
*/
}
}
-/* line_construct_pp()
+/*
+ * line_construct_pp()
* two points
*/
Datum
}
-/* line_distance()
+/*
+ * line_distance()
* Distance between two lines.
*/
Datum
hypot(l1->A, l1->B)));
}
-/* line_interpt()
+/*
+ * line_interpt()
* Point where two lines l1, l2 intersect (if any)
*/
Datum
}
-/* path_inter -
+/*
+ * path_inter -
* Does p1 intersect p2 at any point?
* Use bounding boxes for a quick (O(n)) check, then do a
* O(n^2) iterative edge check.
PG_RETURN_BOOL(false);
}
-/* path_distance()
+/*
+ * path_distance()
* This essentially does a cartesian product of the lsegs in the
* two paths, and finds the min distance between any two lsegs
*/
}
-/* lseg_construct -
+/*
+ * lseg_construct -
* form a LSEG from two Points.
*/
Datum
*---------------------------------------------------------*/
/*
- ** find intersection of the two lines, and see if it falls on
- ** both segments.
+ * find intersection of the two lines, and see if it falls on
+ * both segments.
*/
Datum
lseg_intersect(PG_FUNCTION_ARGS)
* Line arithmetic routines.
*---------------------------------------------------------*/
-/* lseg_distance -
+/*
+ * lseg_distance -
* If two segments don't intersect, then the closest
* point will be from one of the endpoints to the other
* segment.
PG_RETURN_BOOL(box_contain_point(box, pt));
}
-/* on_ppath -
+/*
+ * on_ppath -
* Whether a point lies within (on) a polyline.
* If open, we have to (groan) check each segment.
* (uses same algorithm as for point intersecting segment - tgl 1997-07-09)
}
-/* inter_lb()
+/*
+ * inter_lb()
* Do line and box intersect?
*/
Datum
**
***********************************************************************/
-/* path_add()
+/*
+ * path_add()
* Concatenate two paths (only if they are both open).
*/
Datum
PG_RETURN_PATH_P(result);
}
-/* path_add_pt()
+/*
+ * path_add_pt()
* Translation operators.
*/
Datum
PG_RETURN_PATH_P(path);
}
-/* path_mul_pt()
+/*
+ * path_mul_pt()
* Rotation and scaling operators.
*/
Datum
}
-/* box_poly()
+/*
+ * box_poly()
* Convert a box to a polygon.
*/
Datum
* Formatting and conversion routines.
*---------------------------------------------------------*/
-/* circle_in - convert a string to internal form.
+/*
+ * circle_in - convert a string to internal form.
*
* External format: (center and radius of circle)
* "<(f8,f8),f8>"
PG_RETURN_CIRCLE_P(circle);
}
-/* circle_out - convert a circle to external form.
+/*
+ * circle_out - convert a circle to external form.
*/
Datum
circle_out(PG_FUNCTION_ARGS)
* <, >, <=, >=, and == are based on circle area.
*---------------------------------------------------------*/
-/* circles identical?
+/*
+ * circles identical?
*
* We consider NaNs values to be equal to each other to let those circles
* to be found.
point_eq_point(&circle1->center, &circle2->center));
}
-/* circle_overlap - does circle1 overlap circle2?
+/*
+ * circle_overlap - does circle1 overlap circle2?
*/
Datum
circle_overlap(PG_FUNCTION_ARGS)
float8_pl(circle1->radius, circle2->radius)));
}
-/* circle_overleft - is the right edge of circle1 at or left of
+/*
+ * circle_overleft - is the right edge of circle1 at or left of
* the right edge of circle2?
*/
Datum
float8_pl(circle2->center.x, circle2->radius)));
}
-/* circle_left - is circle1 strictly left of circle2?
+/*
+ * circle_left - is circle1 strictly left of circle2?
*/
Datum
circle_left(PG_FUNCTION_ARGS)
float8_mi(circle2->center.x, circle2->radius)));
}
-/* circle_right - is circle1 strictly right of circle2?
+/*
+ * circle_right - is circle1 strictly right of circle2?
*/
Datum
circle_right(PG_FUNCTION_ARGS)
float8_pl(circle2->center.x, circle2->radius)));
}
-/* circle_overright - is the left edge of circle1 at or right of
+/*
+ * circle_overright - is the left edge of circle1 at or right of
* the left edge of circle2?
*/
Datum
float8_mi(circle2->center.x, circle2->radius)));
}
-/* circle_contained - is circle1 contained by circle2?
+/*
+ * circle_contained - is circle1 contained by circle2?
*/
Datum
circle_contained(PG_FUNCTION_ARGS)
float8_mi(circle2->radius, circle1->radius)));
}
-/* circle_contain - does circle1 contain circle2?
+/*
+ * circle_contain - does circle1 contain circle2?
*/
Datum
circle_contain(PG_FUNCTION_ARGS)
}
-/* circle_below - is circle1 strictly below circle2?
+/*
+ * circle_below - is circle1 strictly below circle2?
*/
Datum
circle_below(PG_FUNCTION_ARGS)
float8_mi(circle2->center.y, circle2->radius)));
}
-/* circle_above - is circle1 strictly above circle2?
+/*
+ * circle_above - is circle1 strictly above circle2?
*/
Datum
circle_above(PG_FUNCTION_ARGS)
float8_pl(circle2->center.y, circle2->radius)));
}
-/* circle_overbelow - is the upper edge of circle1 at or below
+/*
+ * circle_overbelow - is the upper edge of circle1 at or below
* the upper edge of circle2?
*/
Datum
float8_pl(circle2->center.y, circle2->radius)));
}
-/* circle_overabove - is the lower edge of circle1 at or above
+/*
+ * circle_overabove - is the lower edge of circle1 at or above
* the lower edge of circle2?
*/
Datum
}
-/* circle_relop - is area(circle1) relop area(circle2), within
+/*
+ * circle_relop - is area(circle1) relop area(circle2), within
* our accuracy constraint?
*/
Datum
* "Arithmetic" operators on circles.
*---------------------------------------------------------*/
-/* circle_add_pt()
+/*
+ * circle_add_pt()
* Translation operator.
*/
Datum
}
-/* circle_mul_pt()
+/*
+ * circle_mul_pt()
* Rotation and scaling operators.
*/
Datum
}
-/* circle_area - returns the area of the circle.
+/*
+ * circle_area - returns the area of the circle.
*/
Datum
circle_area(PG_FUNCTION_ARGS)
}
-/* circle_diameter - returns the diameter of the circle.
+/*
+ * circle_diameter - returns the diameter of the circle.
*/
Datum
circle_diameter(PG_FUNCTION_ARGS)
}
-/* circle_radius - returns the radius of the circle.
+/*
+ * circle_radius - returns the radius of the circle.
*/
Datum
circle_radius(PG_FUNCTION_ARGS)
}
-/* circle_distance - returns the distance between
+/*
+ * circle_distance - returns the distance between
* two circles.
*/
Datum
}
-/* dist_pc - returns the distance between
+/*
+ * dist_pc - returns the distance between
* a point and a circle.
*/
Datum
PG_RETURN_FLOAT8(result);
}
-/* circle_center - returns the center point of the circle.
+/*
+ * circle_center - returns the center point of the circle.
*/
Datum
circle_center(PG_FUNCTION_ARGS)
}
-/* circle_ar - returns the area of the circle.
+/*
+ * circle_ar - returns the area of the circle.
*/
static float8
circle_ar(CIRCLE *circle)
PG_RETURN_NULL();
}
-/* box_circle()
+/*
+ * box_circle()
* Convert a box to a circle.
*/
Datum
}
-/* lseg_crossing()
+/*
+ * lseg_crossing()
* Returns +/-2 if line segment crosses the positive X-axis in a +/- direction.
* Returns +/-1 if one point is on the positive X-axis.
* Returns 0 if both points are on the positive X-axis, or there is no crossing.
}
-/* int[24]abs()
+/*
+ * int[24]abs()
* Absolute value
*/
Datum
* Formatting and conversion routines.
*---------------------------------------------------------*/
-/* int8in()
+/*
+ * int8in()
*/
Datum
int8in(PG_FUNCTION_ARGS)
}
-/* int8out()
+/*
+ * int8out()
*/
Datum
int8out(PG_FUNCTION_ARGS)
* Relational operators for int8s, including cross-data-type comparisons.
*---------------------------------------------------------*/
-/* int8relop()
+/*
+ * int8relop()
* Is val1 relop val2?
*/
Datum
PG_RETURN_BOOL(val1 >= val2);
}
-/* int84relop()
+/*
+ * int84relop()
* Is 64-bit val1 relop 32-bit val2?
*/
Datum
PG_RETURN_BOOL(val1 >= val2);
}
-/* int48relop()
+/*
+ * int48relop()
* Is 32-bit val1 relop 64-bit val2?
*/
Datum
PG_RETURN_BOOL(val1 >= val2);
}
-/* int82relop()
+/*
+ * int82relop()
* Is 64-bit val1 relop 16-bit val2?
*/
Datum
PG_RETURN_BOOL(val1 >= val2);
}
-/* int28relop()
+/*
+ * int28relop()
* Is 16-bit val1 relop 64-bit val2?
*/
Datum
PG_RETURN_INT64(result);
}
-/* int8abs()
+/*
+ * int8abs()
* Absolute value
*/
Datum
PG_RETURN_INT64(result);
}
-/* int8mod()
+/*
+ * int8mod()
* Modulo operation.
*/
Datum
PG_RETURN_INT64((int64) arg1 / arg2);
}
-/* Binary arithmetics
+/*
+ * Binary arithmetics
*
* int8and - returns arg1 & arg2
* int8or - returns arg1 | arg2
PG_RETURN_FLOAT8(result);
}
-/* dtoi8()
+/*
+ * dtoi8()
* Convert float8 to 8-byte integer.
*/
Datum
PG_RETURN_FLOAT4(result);
}
-/* ftoi8()
+/*
+ * ftoi8()
* Convert float4 to 8-byte integer.
*/
Datum
* pg_advisory_unlock(int8) - release exclusive lock on an int8 key
*
* Returns true if successful, false if lock was not held
-*/
+ */
Datum
pg_advisory_unlock_int8(PG_FUNCTION_ARGS)
{
* pg_advisory_unlock(int4, int4) - release exclusive lock on 2 int4 keys
*
* Returns true if successful, false if lock was not held
-*/
+ */
Datum
pg_advisory_unlock_int4(PG_FUNCTION_ARGS)
{
}
/*
-* When adding a new column to the pg_stat_io view and the
-* pg_stat_get_backend_io() function, add a new enum value here above
-* IO_NUM_COLUMNS.
-*/
+ * When adding a new column to the pg_stat_io view and the
+ * pg_stat_get_backend_io() function, add a new enum value here above
+ * IO_NUM_COLUMNS.
+ */
typedef enum io_stat_col
{
IO_COL_INVALID = -1,
/*
* strip_all_phvs_deep
* Deeply strip all PlaceHolderVars in an expression.
-
+ *
* As a performance optimization, we first use a lightweight walker to check
* for the presence of any PlaceHolderVars. The expensive mutator is invoked
* only if a PlaceHolderVar is found, avoiding unnecessary memory allocation
* USER I/O ROUTINES *
*****************************************************************************/
-/* timestamp_in()
+/*
+ * timestamp_in()
* Convert a string to internal form.
*/
Datum
PG_RETURN_TIMESTAMP(result);
}
-/* timestamp_out()
+/*
+ * timestamp_out()
* Convert a timestamp to external form.
*/
Datum
PG_RETURN_POINTER(ret);
}
-/* timestamp_scale()
+/*
+ * timestamp_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
*/
return true;
}
-/* timestamptz_in()
+/*
+ * timestamptz_in()
* Convert a string to internal form.
*/
Datum
PG_RETURN_TIMESTAMP(result);
}
-/* timestamptz_out()
+/*
+ * timestamptz_out()
* Convert a timestamp to external form.
*/
Datum
}
-/* timestamptz_scale()
+/*
+ * timestamptz_scale()
* Adjust time type for specified scale factor.
* Used by PostgreSQL type system to stuff columns.
*/
}
-/* interval_in()
+/*
+ * interval_in()
* Convert a string to internal form.
*
* External format(s):
PG_RETURN_INTERVAL_P(result);
}
-/* interval_out()
+/*
+ * interval_out()
* Convert a time span to external form.
*/
Datum
PG_RETURN_POINTER(ret);
}
-/* interval_scale()
+/*
+ * interval_scale()
* Adjust interval type for specified fields.
* Used by PostgreSQL type system to stuff columns.
*/
PG_RETURN_NULL(); /* keep compiler quiet */
}
-/* EncodeSpecialTimestamp()
+/*
+ * EncodeSpecialTimestamp()
* Convert reserved timestamp data type to string.
*/
void
}
-/* tm2timestamp()
+/*
+ * tm2timestamp()
* Convert a tm structure to a timestamp data type.
* Note that year is _not_ 1900-based, but is an explicit full value.
* Also, month is one-based, _not_ zero-based.
}
-/* interval2itm()
+/*
+ * interval2itm()
* Convert an Interval to a pg_itm structure.
* Note: overflow is not possible, because the pg_itm fields are
* wide enough for all possible conversion results.
itm->tm_usec = (int) time;
}
-/* itm2interval()
+/*
+ * itm2interval()
* Convert a pg_itm structure to an Interval.
* Returns 0 if OK, -1 on overflow.
*
return 0;
}
-/* itmin2interval()
+/*
+ * itmin2interval()
* Convert a pg_itm_in structure to an Interval.
* Returns 0 if OK, -1 on overflow.
*
PG_GETARG_DATUM(1));
}
-/* overlaps_timestamp() --- implements the SQL OVERLAPS operator.
+/*
+ * overlaps_timestamp() --- implements the SQL OVERLAPS operator.
*
* Algorithm is per SQL spec. This is much harder than you'd think
* because the spec requires us to deliver a non-null answer in some cases
PG_RETURN_INTERVAL_P(result);
}
-/* timestamp_pl_interval()
+/*
+ * timestamp_pl_interval()
* Add an interval to a timestamp data type.
* Note that interval has provisions for qualitative year/month and day
* units, so try to do the right thing with them.
}
-/* timestamptz_pl_interval_internal()
+/*
+ * timestamptz_pl_interval_internal()
* Add an interval to a timestamptz, in the given (or session) timezone.
*
* Note that interval has provisions for qualitative year/month and day
return result;
}
-/* timestamptz_mi_interval_internal()
+/*
+ * timestamptz_mi_interval_internal()
* As above, but subtract the interval.
*/
static TimestampTz
return timestamptz_pl_interval_internal(timestamp, &tspan, attimezone);
}
-/* timestamptz_pl_interval()
+/*
+ * timestamptz_pl_interval()
* Add an interval to a timestamptz, in the session timezone.
*/
Datum
PG_RETURN_TIMESTAMP(timestamptz_mi_interval_internal(timestamp, span, NULL));
}
-/* timestamptz_pl_interval_at_zone()
+/*
+ * timestamptz_pl_interval_at_zone()
* Add an interval to a timestamptz, in the specified timezone.
*/
Datum
PG_RETURN_TIMESTAMP(timestamptz_mi_interval_internal(timestamp, span, attimezone));
}
-/* interval_um_internal()
+/*
+ * interval_um_internal()
* Negate an interval.
*/
static void
PG_RETURN_INTERVAL_P(result);
}
-/* timestamp_age()
+/*
+ * timestamp_age()
* Calculate time difference while retaining year/month fields.
* Note that this does not result in an accurate absolute time span
* since year and month are out of context once the arithmetic
}
-/* timestamptz_age()
+/*
+ * timestamptz_age()
* Calculate time difference while retaining year/month fields.
* Note that this does not result in an accurate absolute time span
* since year and month are out of context once the arithmetic
*---------------------------------------------------------*/
-/* timestamp_bin()
+/*
+ * timestamp_bin()
* Bin timestamp into specified interval.
*/
Datum
PG_RETURN_TIMESTAMP(result);
}
-/* timestamp_trunc()
+/*
+ * timestamp_trunc()
* Truncate timestamp to specified units.
*/
Datum
PG_RETURN_TIMESTAMP(result);
}
-/* timestamptz_bin()
+/*
+ * timestamptz_bin()
* Bin timestamptz into specified interval using specified origin.
*/
Datum
return result;
}
-/* timestamptz_trunc()
+/*
+ * timestamptz_trunc()
* Truncate timestamptz to specified units in session timezone.
*/
Datum
PG_RETURN_TIMESTAMPTZ(result);
}
-/* timestamptz_trunc_zone()
+/*
+ * timestamptz_trunc_zone()
* Truncate timestamptz to specified units in specified timezone.
*/
Datum
PG_RETURN_TIMESTAMPTZ(result);
}
-/* interval_trunc()
+/*
+ * interval_trunc()
* Extract specified field from interval.
*/
Datum
PG_RETURN_INTERVAL_P(result);
}
-/* isoweek2j()
+/*
+ * isoweek2j()
*
* Return the Julian day which corresponds to the first day (Monday) of the given ISO 8601 year and week.
* Julian days are used to convert between ISO week dates and Gregorian dates.
return ((week - 1) * 7) + (day4 - day0);
}
-/* isoweek2date()
+/*
+ * isoweek2date()
* Convert ISO week of year number to date.
* The year field must be specified with the ISO year!
* karel 2000/08/07
j2date(isoweek2j(*year, woy), year, mon, mday);
}
-/* isoweekdate2date()
+/*
+ * isoweekdate2date()
*
* Convert an ISO 8601 week date (ISO year, ISO week) into a Gregorian date.
* Gregorian day of week sent so weekday strings can be supplied.
j2date(jday, year, mon, mday);
}
-/* date2isoweek()
+/*
+ * date2isoweek()
*
* Returns ISO week number of year.
*/
}
-/* date2isoyear()
+/*
+ * date2isoyear()
*
* Returns ISO 8601 year number.
* Note: zero or negative results follow the year-zero-exists convention.
}
-/* date2isoyearday()
+/*
+ * date2isoyearday()
*
* Returns the ISO 8601 day-of-year, given a Gregorian year, month and day.
* Possible return values are 1 through 371 (364 in non-leap years).
}
}
-/* timestamp_part() and extract_timestamp()
+/*
+ * timestamp_part() and extract_timestamp()
* Extract specified field from timestamp.
*/
static Datum
return timestamp_part_common(fcinfo, true);
}
-/* timestamptz_part() and extract_timestamptz()
+/*
+ * timestamptz_part() and extract_timestamptz()
* Extract specified field from timestamp with time zone.
*/
static Datum
}
}
-/* interval_part() and extract_interval()
+/*
+ * interval_part() and extract_interval()
* Extract specified field from interval.
*/
static Datum
}
-/* timestamp_zone()
+/*
+ * timestamp_zone()
* Encode timestamp type with specified time zone.
* This function is just timestamp2timestamptz() except instead of
* shifting to the global timezone, we shift to the specified timezone.
PG_RETURN_TIMESTAMPTZ(result);
}
-/* timestamp_izone()
+/*
+ * timestamp_izone()
* Encode timestamp type with specified time interval as time zone.
*/
Datum
PG_RETURN_TIMESTAMPTZ(result);
} /* timestamp_izone() */
-/* TimestampTimestampTzRequiresRewrite()
+/*
+ * TimestampTimestampTzRequiresRewrite()
*
* Returns false if the TimeZone GUC setting causes timestamp_timestamptz and
* timestamptz_timestamp to be no-ops, where the return value has the same
return true;
}
-/* timestamp_timestamptz()
+/*
+ * timestamp_timestamptz()
* Convert local timestamp to timestamp at GMT
*/
Datum
return timestamp2timestamptz_safe(timestamp, NULL);
}
-/* timestamptz_timestamp()
+/*
+ * timestamptz_timestamp()
* Convert timestamp at GMT to local timestamp
*/
Datum
return result;
}
-/* timestamptz_zone()
+/*
+ * timestamptz_zone()
* Evaluate timestamp with time zone type at the specified time zone.
* Returns a timestamp without time zone.
*/
PG_RETURN_TIMESTAMP(result);
}
-/* timestamptz_izone()
+/*
+ * timestamptz_izone()
* Encode timestamp with time zone type with specified time interval as time zone.
* Returns a timestamp without time zone.
*/
PG_RETURN_TIMESTAMP(result);
}
-/* generate_series_timestamp()
+/*
+ * generate_series_timestamp()
* Generate the set of timestamps from start to finish by step
*/
Datum
}
}
-/* generate_series_timestamptz()
+/*
+ * generate_series_timestamptz()
* Generate the set of timestamps from start to finish by step,
* doing arithmetic in the specified or session timezone.
*/
}
-/* timestamp_at_local()
+/*
+ * timestamp_at_local()
* timestamptz_at_local()
*
* The regression tests do not like two functions with the same proargs and
}
-/* char_bpchar()
+/*
+ * char_bpchar()
* Convert char to bpchar(1).
*/
Datum
}
-/* bpchar_name()
+/*
+ * bpchar_name()
* Converts a bpchar() type to a NameData type.
*/
Datum
PG_RETURN_NAME(result);
}
-/* name_bpchar()
+/*
+ * name_bpchar()
* Converts a NameData type to a bpchar type.
*
* Uses the text conversion functions, which is only appropriate if BpChar
return result;
}
-/* text_cmp()
+/*
+ * text_cmp()
* Internal comparison function for text strings.
* Returns -1, 0 or 1
*/
}
-/* text_name()
+/*
+ * text_name()
* Converts a text type to a Name type.
*/
Datum
PG_RETURN_NAME(result);
}
-/* name_text()
+/*
+ * name_text()
* Converts a Name type to a text type.
*/
Datum
* ereport will provide one for the output methods that need it.
*/
int
-errmsg(const char *fmt,...)
+errmsg(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* error recursion.
*/
int
-errmsg_internal(const char *fmt,...)
+errmsg_internal(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
*/
int
errmsg_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...)
+ unsigned long n, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* errdetail --- add a detail error message text to the current error
*/
int
-errdetail(const char *fmt,...)
+errdetail(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* (typically, that they don't seem to be useful to average users).
*/
int
-errdetail_internal(const char *fmt,...)
+errdetail_internal(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* errdetail_log --- add a detail_log error message text to the current error
*/
int
-errdetail_log(const char *fmt,...)
+errdetail_log(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
*/
int
errdetail_log_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...)
+ unsigned long n, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
*/
int
errdetail_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...)
+ unsigned long n, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* errhint --- add a hint error message text to the current error
*/
int
-errhint(const char *fmt,...)
+errhint(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* Non-translated version of errhint(), see also errmsg_internal().
*/
int
-errhint_internal(const char *fmt,...)
+errhint_internal(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
*/
int
errhint_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...)
+ unsigned long n, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
* states.
*/
int
-errcontext_msg(const char *fmt,...)
+errcontext_msg(const char *fmt, ...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
}
char *
-format_elog_string(const char *fmt,...)
+format_elog_string(const char *fmt, ...)
{
ErrorData errdata;
ErrorData *edata;
* safely (memory context, GUC load etc)
*/
void
-write_stderr(const char *fmt,...)
+write_stderr(const char *fmt, ...)
{
va_list ap;
static void appendJSONKeyValueFmt(StringInfo buf, const char *key,
bool escape_key,
- const char *fmt,...) pg_attribute_printf(4, 5);
+ const char *fmt, ...) pg_attribute_printf(4, 5);
/*
* appendJSONKeyValue
*/
static void
appendJSONKeyValueFmt(StringInfo buf, const char *key,
- bool escape_key, const char *fmt,...)
+ bool escape_key, const char *fmt, ...)
{
int save_errno = errno;
size_t len = 128; /* initial assumption about buffer size */
return len;
}
-/* returns the length (counted in wchars) of a multibyte string
+/*
+ * returns the length (counted in wchars) of a multibyte string
* (stops at the first of "limit" or a NUL)
*/
int
static bool assignable_custom_variable_name(const char *name, bool skip_errors,
int elevel);
static void do_serialize(char **destptr, Size *maxbytes,
- const char *fmt,...) pg_attribute_printf(3, 4);
+ const char *fmt, ...) pg_attribute_printf(3, 4);
static bool call_bool_check_hook(const struct config_generic *conf, bool *newval,
void **extra, GucSource source, int elevel);
static bool call_int_check_hook(const struct config_generic *conf, int *newval,
* maxbytes is not sufficient to copy the string, error out.
*/
static void
-do_serialize(char **destptr, Size *maxbytes, const char *fmt,...)
+do_serialize(char **destptr, Size *maxbytes, const char *fmt, ...)
{
va_list vargs;
int n;
/*
-* BumpContextCreate
-* Create a new Bump context.
-*
-* parent: parent context, or NULL if top-level context
-* name: name of context (must be statically allocated)
-* minContextSize: minimum context size
-* initBlockSize: initial allocation block size
-* maxBlockSize: maximum allocation block size
-*/
+ * BumpContextCreate
+ * Create a new Bump context.
+ *
+ * parent: parent context, or NULL if top-level context
+ * name: name of context (must be statically allocated)
+ * minContextSize: minimum context size
+ * initBlockSize: initial allocation block size
+ * maxBlockSize: maximum allocation block size
+ */
MemoryContext
BumpContextCreate(MemoryContext parent, const char *name, Size minContextSize,
Size initBlockSize, Size maxBlockSize)
* SlabChunkIndex
* Get the 0-based index of how many chunks into the block the given
* chunk is.
-*/
+ */
#define SlabChunkIndex(slab, block, chunk) \
(((char *) (chunk) - (char *) SlabBlockGetChunk(slab, block, 0)) / \
(slab)->fullChunkSize)
ReceiveCopyData(conn, ReceiveArchiveStreamChunk, &state);
/* If we wrote the backup manifest to a file, close the file. */
- if (state.manifest_file !=NULL)
+ if (state.manifest_file != NULL)
{
fclose(state.manifest_file);
state.manifest_file = NULL;
/* Sanity check. */
if (state->manifest_buffer != NULL ||
- state->manifest_file !=NULL)
+ state->manifest_file != NULL)
pg_fatal("archives must precede manifest");
/* Parse the rest of the CopyData message. */
appendPQExpBuffer(state->manifest_buffer, copybuf + 1,
r - 1);
}
- else if (state->manifest_file !=NULL)
+ else if (state->manifest_file != NULL)
{
/* Manifest data, write to disk. */
if (fwrite(copybuf + 1, r - 1, 1,
XLogRecPtr start_lsn,
XLogRecPtr end_lsn);
pg_noreturn static void report_manifest_error(JsonManifestParseContext *context,
- const char *fmt,...)
+ const char *fmt, ...)
pg_attribute_printf(2, 3);
/*
* expects this function not to return.
*/
static void
-report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
+report_manifest_error(JsonManifestParseContext *context, const char *fmt, ...)
{
va_list ap;
#endif
-static void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2);
+static void write_stderr(const char *fmt, ...) pg_attribute_printf(1, 2);
static void do_advice(void);
static void do_help(void);
static void set_mode(char *modeopt);
* not available).
*/
static void
-write_stderr(const char *fmt,...)
+write_stderr(const char *fmt, ...)
{
va_list ap;
return tblinfo;
}
-/* flagInhTables -
+/*
+ * flagInhTables -
* Fill in parent link fields of tables for which we need that information,
* mark parents of target tables as interesting, and create
* TableAttachInfo objects for partitioned tables with appropriate
}
}
-/* flagInhAttrs -
+/*
+ * flagInhAttrs -
* for each dumpable table in tblinfo, flag its inherited attributes
*
* What we need to do here is:
void
-pg_log_filter_error(FilterStateData *fstate, const char *fmt,...)
+pg_log_filter_error(FilterStateData *fstate, const char *fmt, ...)
{
va_list argp;
char buf[256];
extern const char *filter_object_type_name(FilterObjectType fot);
extern void filter_init(FilterStateData *fstate, const char *filename, exit_function f_exit);
extern void filter_free(FilterStateData *fstate);
-extern void pg_log_filter_error(FilterStateData *fstate, const char *fmt,...)
+extern void pg_log_filter_error(FilterStateData *fstate, const char *fmt, ...)
pg_attribute_printf(2, 3);
extern bool filter_read_item(FilterStateData *fstate, char **objname,
FilterCommandType *comtype, FilterObjectType *objtype);
/* Convenience functions used only when writing DATA */
extern void archputs(const char *s, Archive *AH);
-extern int archprintf(Archive *AH, const char *fmt,...) pg_attribute_printf(2, 3);
+extern int archprintf(Archive *AH, const char *fmt, ...) pg_attribute_printf(2, 3);
#define appendStringLiteralAH(buf,str,AH) \
appendStringLiteral(buf, str, (AH)->encoding, (AH)->std_strings)
/* Public */
int
-archprintf(Archive *AH, const char *fmt,...)
+archprintf(Archive *AH, const char *fmt, ...)
{
int save_errno = errno;
char *p;
* Print formatted text to the output file (usually stdout).
*/
int
-ahprintf(ArchiveHandle *AH, const char *fmt,...)
+ahprintf(ArchiveHandle *AH, const char *fmt, ...)
{
int save_errno = errno;
char *p;
/* on some error, we may decide to go on... */
void
-warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...)
+warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt, ...)
{
va_list ap;
extern void on_exit_close_archive(Archive *AHX);
extern void replace_on_exit_close_archive(Archive *AHX);
-extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void warn_or_exit_horribly(ArchiveHandle *AH, const char *fmt, ...) pg_attribute_printf(2, 3);
/* Options for ArchiveEntry */
typedef struct _archiveOpts
extern void DropLOIfExists(ArchiveHandle *AH, Oid oid);
void ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
-int ahprintf(ArchiveHandle *AH, const char *fmt,...) pg_attribute_printf(2, 3);
+int ahprintf(ArchiveHandle *AH, const char *fmt, ...) pg_attribute_printf(2, 3);
#endif
* Optional.
*
* Set up extract format-related TOC data.
-*/
+ */
static void
_ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
{
/*
* Print data from current file position.
-*/
+ */
static void
_PrintData(ArchiveHandle *AH)
{
* Skip data from current file position.
* Data blocks are formatted as an integer length, followed by data.
* A zero length indicates the end of the block.
-*/
+ */
static void
_skipData(ArchiveHandle *AH)
{
* Called by the Archiver when the dumper creates a new TOC entry.
*
* We determine the filename for this entry.
-*/
+ */
static void
_ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
{
/*
* Print data for a given TOC entry
-*/
+ */
static void
_PrintTocData(ArchiveHandle *AH, TocEntry *te)
{
#ifdef __NOT_USED__
static char *tarGets(char *buf, size_t len, TAR_MEMBER *th);
#endif
-static int tarPrintf(TAR_MEMBER *th, const char *fmt,...) pg_attribute_printf(2, 3);
+static int tarPrintf(TAR_MEMBER *th, const char *fmt, ...) pg_attribute_printf(2, 3);
static void _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th);
static TAR_MEMBER *_tarPositionTo(ArchiveHandle *AH, const char *filename);
/*
* Print data for a given TOC entry
-*/
+ */
static void
_PrintTocData(ArchiveHandle *AH, TocEntry *te)
{
*/
static int
-tarPrintf(TAR_MEMBER *th, const char *fmt,...)
+tarPrintf(TAR_MEMBER *th, const char *fmt, ...)
{
int save_errno = errno;
char *p;
*/
bool
exec_prog(const char *log_filename, const char *opt_log_file,
- bool report_error, bool exit_on_error, const char *fmt,...)
+ bool report_error, bool exit_on_error, const char *fmt, ...)
{
int result = 0;
int written;
*/
void
parallel_exec_prog(const char *log_file, const char *opt_log_file,
- const char *fmt,...)
+ const char *fmt, ...)
{
va_list args;
char cmd[MAX_STRING];
/*
* LogOpts
-*/
+ */
typedef struct
{
FILE *internal; /* internal log FILE */
/*
* UserOpts
-*/
+ */
typedef struct
{
bool check; /* check clusters only, don't change any data */
#define EXEC_PSQL_ARGS "--echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1"
bool exec_prog(const char *log_filename, const char *opt_log_file,
- bool report_error, bool exit_on_error, const char *fmt,...) pg_attribute_printf(5, 6);
+ bool report_error, bool exit_on_error, const char *fmt, ...) pg_attribute_printf(5, 6);
void verify_directories(void);
bool pid_lock_file_exists(const char *datadir);
/* server.c */
PGconn *connectToServer(ClusterInfo *cluster, const char *db_name);
-PGresult *executeQueryOrDie(PGconn *conn, const char *fmt,...) pg_attribute_printf(2, 3);
+PGresult *executeQueryOrDie(PGconn *conn, const char *fmt, ...) pg_attribute_printf(2, 3);
char *cluster_conn_opts(ClusterInfo *cluster);
char *quote_identifier(const char *s);
int get_user_info(char **user_name_p);
void check_ok(void);
-void report_status(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3);
-void pg_log(eLogType type, const char *fmt,...) pg_attribute_printf(2, 3);
-pg_noreturn void pg_fatal(const char *fmt,...) pg_attribute_printf(1, 2);
+void report_status(eLogType type, const char *fmt, ...) pg_attribute_printf(2, 3);
+void pg_log(eLogType type, const char *fmt, ...) pg_attribute_printf(2, 3);
+pg_noreturn void pg_fatal(const char *fmt, ...) pg_attribute_printf(1, 2);
void end_progress_output(void);
void cleanup_output_dirs(void);
-void prep_status(const char *fmt,...) pg_attribute_printf(1, 2);
-void prep_status_progress(const char *fmt,...) pg_attribute_printf(1, 2);
+void prep_status(const char *fmt, ...) pg_attribute_printf(1, 2);
+void prep_status_progress(const char *fmt, ...) pg_attribute_printf(1, 2);
unsigned int str2uint(const char *str);
/* parallel.c */
void parallel_exec_prog(const char *log_file, const char *opt_log_file,
- const char *fmt,...) pg_attribute_printf(3, 4);
+ const char *fmt, ...) pg_attribute_printf(3, 4);
void parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
char *old_pgdata, char *new_pgdata,
char *old_tablespace, char *new_tablespace);
* message and calls exit() to kill the program.
*/
PGresult *
-executeQueryOrDie(PGconn *conn, const char *fmt,...)
+executeQueryOrDie(PGconn *conn, const char *fmt, ...)
{
static char query[QUERY_ALLOC];
va_list args;
* results and other messages.
*/
void
-report_status(eLogType type, const char *fmt,...)
+report_status(eLogType type, const char *fmt, ...)
{
va_list args;
* pg_log(PG_FATAL, "failed: %s", message);
*/
void
-prep_status(const char *fmt,...)
+prep_status(const char *fmt, ...)
{
va_list args;
char message[MAX_STRING];
* report_status(PG_REPORT, "ok");
*/
void
-prep_status_progress(const char *fmt,...)
+prep_status_progress(const char *fmt, ...)
{
va_list args;
char message[MAX_STRING];
void
-pg_log(eLogType type, const char *fmt,...)
+pg_log(eLogType type, const char *fmt, ...)
{
va_list args;
void
-pg_fatal(const char *fmt,...)
+pg_fatal(const char *fmt, ...)
{
va_list args;
XLogRecPtr start_lsn,
XLogRecPtr end_lsn);
pg_noreturn static void report_manifest_error(JsonManifestParseContext *context,
- const char *fmt,...)
+ const char *fmt, ...)
pg_attribute_printf(2, 3);
static void verify_tar_backup(verifier_context *context, DIR *dir,
* expects this function not to return.
*/
static void
-report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
+report_manifest_error(JsonManifestParseContext *context, const char *fmt, ...)
{
va_list ap;
* context says we should.
*/
void
-report_backup_error(verifier_context *context, const char *pg_restrict fmt,...)
+report_backup_error(verifier_context *context, const char *pg_restrict fmt, ...)
{
va_list ap;
* Report a fatal error and exit
*/
void
-report_fatal_error(const char *pg_restrict fmt,...)
+report_fatal_error(const char *pg_restrict fmt, ...)
{
va_list ap;
} verifier_context;
extern void report_backup_error(verifier_context *context,
- const char *pg_restrict fmt,...)
+ const char *pg_restrict fmt, ...)
pg_attribute_printf(2, 3);
-pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt,...)
+pg_noreturn extern void report_fatal_error(const char *pg_restrict fmt, ...)
pg_attribute_printf(1, 2);
extern bool should_ignore_relpath(verifier_context *context,
const char *relpath);
static int compare_block_numbers(const void *a, const void *b);
static int walsummary_read_callback(void *callback_arg, void *data,
int length);
-static void walsummary_error_callback(void *callback_arg, char *fmt,...) pg_attribute_printf(2, 3);
+static void walsummary_error_callback(void *callback_arg, char *fmt, ...) pg_attribute_printf(2, 3);
/*
* Main program.
* Error callback.
*/
void
-walsummary_error_callback(void *callback_arg, char *fmt,...)
+walsummary_error_callback(void *callback_arg, char *fmt, ...)
{
va_list ap;
/*
* end of configurable parameters
- *********************************************************************/
+ */
#define nbranches 1 /* Makes little sense to change this. Change
* -s instead */
}
-/* ConnectionUp
+/*
+ * ConnectionUp
*
* Returns whether our backend connection is still there.
*/
-/* CheckConnection
+/*
+ * CheckConnection
*
* Verify that we still have a good connection to the backend, and if not,
* see if it can be restored.
return res;
}
-/* expand_tilde
+/*
+ * expand_tilde
*
* substitute '~' with HOME or '~username' with username's home dir
*
#include "large_obj.h"
#include "settings.h"
-static void print_lo_result(const char *fmt,...) pg_attribute_printf(1, 2);
+static void print_lo_result(const char *fmt, ...) pg_attribute_printf(1, 2);
static void
-print_lo_result(const char *fmt,...)
+print_lo_result(const char *fmt, ...)
{
va_list ap;
-/* showVersion
+/*
+ * showVersion
*
* This output format is intended to match GNU standards.
*/
#ifndef STRINGUTILS_H
#define STRINGUTILS_H
-/* The cooler version of strtok() which knows about quotes and doesn't
- * overwrite your input */
+/*
+ * The cooler version of strtok() which knows about quotes and doesn't
+ * overwrite your input
+ */
extern char *strtokx(const char *s,
const char *whitespace,
const char *delim,
} SchemaQuery;
-/* Store maximum number of records we want from database queries
+/*
+ * Store maximum number of records we want from database queries
* (implemented via SELECT ... LIMIT xx).
*/
static int completion_max_records;
static bool
TailMatchesImpl(bool case_sensitive,
int previous_words_count, char **previous_words,
- int narg,...)
+ int narg, ...)
{
const char *argarray[64];
va_list args;
static bool
HeadMatchesImpl(bool case_sensitive,
int previous_words_count, char **previous_words,
- int narg,...)
+ int narg, ...)
{
const char *argarray[64];
va_list args;
static bool
MatchesImpl(bool case_sensitive,
int previous_words_count, char **previous_words,
- int narg,...)
+ int narg, ...)
{
const char *argarray[64];
va_list args;
* lex_peek
*
* what is the current look_ahead token?
-*/
+ */
static inline JsonTokenType
lex_peek(JsonLexContext *lex)
{
void
pg_log_generic(enum pg_log_level level, enum pg_log_part part,
- const char *pg_restrict fmt,...)
+ const char *pg_restrict fmt, ...)
{
va_list ap;
* revised.
*/
char *
-replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...)
+replace_percent_placeholders(const char *instr, const char *param_name, const char *letters, ...)
{
StringInfoData result;
* One should therefore think twice about using this in libpq.
*/
char *
-psprintf(const char *fmt,...)
+psprintf(const char *fmt, ...)
{
int save_errno = errno;
size_t len = 128; /* initial assumption about buffer size */
#define sigma1_512(x) (S64(19, (x)) ^ S64(61, (x)) ^ R( 6, (x)))
/*** INTERNAL FUNCTION PROTOTYPES *************************************/
-/* NOTE: These should not be accessed directly from outside this
+/*
+ * NOTE: These should not be accessed directly from outside this
* library -- they are intended for private internal visibility/use
* only.
*/
* strcat.
*/
void
-appendStringInfo(StringInfo str, const char *fmt,...)
+appendStringInfo(StringInfo str, const char *fmt, ...)
{
int save_errno = errno;
}
-/* The following functions define the column width of an ISO 10646
+/*
+ * The following functions define the column width of an ISO 10646
* character as follows:
*
* - The null character (U+0000) has a column width of 0.
* parameter (it discovers the number of arguments automagically).
*/
void
-check_mut_excl_opts_internal(int n,...)
+check_mut_excl_opts_internal(int n, ...)
{
char *first = NULL;
va_list args;
double *indexCorrelation,
double *indexPages);
-/* estimate height of a tree-structured index
+/*
+ * estimate height of a tree-structured index
*
* XXX This just computes a value that is later used by amcostestimate. This
* API could be expanded to support passing more values if the need arises.
/* Functions in access/index/amvalidate.c */
extern List *identify_opfamily_groups(CatCList *oprlist, CatCList *proclist);
extern bool check_amproc_signature(Oid funcid, Oid restype, bool exact,
- int minargs, int maxargs,...);
+ int minargs, int maxargs, ...);
extern bool check_amoptsproc_signature(Oid funcid);
extern bool check_amop_signature(Oid opno, Oid restype,
Oid lefttype, Oid righttype);
extern int ReadWalSummary(void *wal_summary_io, void *data, int length);
extern int WriteWalSummary(void *wal_summary_io, void *data, int length);
-extern void ReportWalSummaryError(void *callback_arg, char *fmt,...) pg_attribute_printf(2, 3);
+extern void ReportWalSummaryError(void *callback_arg, char *fmt, ...) pg_attribute_printf(2, 3);
#endif /* WALSUMMARY_H */
END_CATALOG_STRUCT
-typedef FormData_pg_db_role_setting * Form_pg_db_role_setting;
+typedef FormData_pg_db_role_setting *Form_pg_db_role_setting;
DECLARE_TOAST_WITH_MACRO(pg_db_role_setting, 2966, 2967, PgDbRoleSettingToastTable, PgDbRoleSettingToastIndex);
* report_error_fn should not return.
*/
typedef int (*io_callback_fn) (void *callback_arg, void *data, int length);
-typedef void (*report_error_fn) (void *callback_arg, char *msg,...) pg_attribute_printf(2, 3);
+typedef void (*report_error_fn) (void *callback_arg, char *msg, ...) pg_attribute_printf(2, 3);
/*
#define repalloc_array(pointer, type, count) ((type *) repalloc_mul(pointer, sizeof(type), count))
/* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2);
+extern char *psprintf(const char *fmt, ...) pg_attribute_printf(1, 2);
extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0);
#endif /* FE_MEMUTILS_H */
* notice follows:
*/
-/* The MIT License
-
- Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com)
-
- Permission is hereby granted, free of charge, to any person
- obtaining a copy of this software and associated documentation
- files (the "Software"), to deal in the Software without
- restriction, including without limitation the rights to use, copy,
- modify, merge, publish, distribute, sublicense, and/or sell copies
- of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be
- included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-*/
+/*
+ * The MIT License
+ *
+ * Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com)
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
/*
* fasthash as implemented here has two interfaces:
void pg_logging_unset_logfile(void);
void pg_log_generic(enum pg_log_level level, enum pg_log_part part,
- const char *pg_restrict fmt,...)
+ const char *pg_restrict fmt, ...)
pg_attribute_printf(3, 4);
void pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
const char *pg_restrict fmt, va_list ap)
TimeLineID tli,
XLogRecPtr start_lsn, XLogRecPtr end_lsn);
typedef void (*json_manifest_error_callback) (JsonManifestParseContext *,
- const char *fmt,...) pg_attribute_printf(2, 3);
+ const char *fmt, ...) pg_attribute_printf(2, 3);
struct JsonManifestParseContext
{
#ifndef PERCENTREPL_H
#define PERCENTREPL_H
-extern char *replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...);
+extern char *replace_percent_placeholders(const char *instr, const char *param_name, const char *letters, ...);
#endif /* PERCENTREPL_H */
return slot;
}
-/* ExecMaterializeSlot - force a slot into the "materialized" state.
+/*
+ * ExecMaterializeSlot - force a slot into the "materialized" state.
*
* This causes the slot's tuple to be a local copy not dependent on any
* external storage (i.e. pointing into a Buffer, or having allocations in
typedef struct ConditionalStackData
{
IfStackElem *head;
-} ConditionalStackData;
+} ConditionalStackData;
typedef struct ConditionalStackData *ConditionalStack;
int *result);
extern bool parse_sync_method(const char *optarg,
DataDirSyncMethod *sync_method);
-extern void check_mut_excl_opts_internal(int n,...);
+extern void check_mut_excl_opts_internal(int n, ...);
/* see comment for check_mut_excl_opts_internal() in option_utils.c for info */
#define check_mut_excl_opts(set, opt, ...) \
*-------------------------------------------------------------------------
*/
-/* These are for invocation of a specifically named function with a
+/*
+ * These are for invocation of a specifically named function with a
* directly-computed parameter list. Note that neither arguments nor result
* are allowed to be NULL. Also, the function cannot be one that needs to
* look at FmgrInfo, since there won't be any.
extern Datum CallerFInfoFunctionCall2(PGFunction func, FmgrInfo *flinfo,
Oid collation, Datum arg1, Datum arg2);
-/* These are for invocation of a previously-looked-up function with a
+/*
+ * These are for invocation of a previously-looked-up function with a
* directly-computed parameter list. Note that neither arguments nor result
* are allowed to be NULL.
*/
Datum arg6, Datum arg7, Datum arg8,
Datum arg9);
-/* These are for invocation of a function identified by OID with a
+/*
+ * These are for invocation of a function identified by OID with a
* directly-computed parameter list. Note that neither arguments nor result
* are allowed to be NULL. These are essentially fmgr_info() followed by
* FunctionCallN(). If the same function is to be invoked repeatedly, do the
Datum arg6, Datum arg7, Datum arg8,
Datum arg9);
-/* These macros allow the collation argument to be omitted (with a default of
+/*
+ * These macros allow the collation argument to be omitted (with a default of
* InvalidOid, ie, no collation). They exist mostly for backwards
* compatibility of source code.
*/
}
/* separate, because pg_attribute_printf(2, 3) can't appear in definition */
-static inline LLVMBasicBlockRef l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,...) pg_attribute_printf(2, 3);
+static inline LLVMBasicBlockRef l_bb_before_v(LLVMBasicBlockRef r, const char *fmt, ...) pg_attribute_printf(2, 3);
/*
* Insert a new basic block, just before r, the name being determined by fmt
* and arguments.
*/
static inline LLVMBasicBlockRef
-l_bb_before_v(LLVMBasicBlockRef r, const char *fmt,...)
+l_bb_before_v(LLVMBasicBlockRef r, const char *fmt, ...)
{
char buf[512];
va_list args;
}
/* separate, because pg_attribute_printf(2, 3) can't appear in definition */
-static inline LLVMBasicBlockRef l_bb_append_v(LLVMValueRef f, const char *fmt,...) pg_attribute_printf(2, 3);
+static inline LLVMBasicBlockRef l_bb_append_v(LLVMValueRef f, const char *fmt, ...) pg_attribute_printf(2, 3);
/*
* Insert a new basic block after previous basic blocks, the name being
* determined by fmt and arguments.
*/
static inline LLVMBasicBlockRef
-l_bb_append_v(LLVMValueRef f, const char *fmt,...)
+l_bb_append_v(LLVMValueRef f, const char *fmt, ...)
{
char buf[512];
va_list args;
* to str if necessary. This is sort of like a combination of sprintf and
* strcat.
*/
-extern void appendStringInfo(StringInfo str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void appendStringInfo(StringInfo str, const char *fmt, ...) pg_attribute_printf(2, 3);
/*------------------------
* appendStringInfoVA
/* IWYU pragma: end_exports */
/*
-* On Windows, <wincrypt.h> includes a #define for X509_NAME, which breaks our
-* ability to use OpenSSL's version of that symbol if <wincrypt.h> is pulled
-* in after <openssl/ssl.h> ... and, at least on some builds, it is. We
-* can't reliably fix that by re-ordering #includes, because libpq/libpq-be.h
-* #includes <openssl/ssl.h>. Instead, just zap the #define again here.
-*/
+ * On Windows, <wincrypt.h> includes a #define for X509_NAME, which breaks our
+ * ability to use OpenSSL's version of that symbol if <wincrypt.h> is pulled
+ * in after <openssl/ssl.h> ... and, at least on some builds, it is. We
+ * can't reliably fix that by re-ordering #includes, because libpq/libpq-be.h
+ * #includes <openssl/ssl.h>. Instead, just zap the #define again here.
+ */
#ifdef X509_NAME
#undef X509_NAME
#endif
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#ifndef GEQO_H
/* GEQO debug flag */
/*
- #define GEQO_DEBUG
+ * #define GEQO_DEBUG
*/
/* choose one recombination mechanism here */
/*
- #define ERX
- #define PMX
- #define CX
- #define PX
- #define OX1
- #define OX2
+ * #define ERX
+ * #define PMX
+ * #define CX
+ * #define PX
+ * #define OX1
+ * #define OX2
*/
#define ERX
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#ifndef GEQO_COPY_H
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#include "nodes/nodes.h"
-/* we presume that int instead of Relid
- is o.k. for Gene; so don't change it! */
+/*
+ * we presume that int instead of Relid
+ * is o.k. for Gene; so don't change it!
+ */
typedef int Gene;
typedef struct Chromosome
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#ifndef GEQO_MISC_H
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#ifndef GEQO_MUTATION_H
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
/* -- parts of this are adapted from D. Whitley's Genitor algorithm -- */
*-------------------------------------------------------------------------
*/
-/* contributed by:
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
- * Martin Utesch * Institute of Automatic Control *
- = = University of Mining and Technology =
- * utesch@aut.tu-freiberg.de * Freiberg, Germany *
- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+/*
+ * contributed by:
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
+ * * Martin Utesch * Institute of Automatic Control *
+ * = = University of Mining and Technology =
+ * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
+ * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
*/
#endif
extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args) pg_attribute_printf(3, 0);
-extern int pg_snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3, 4);
+extern int pg_snprintf(char *str, size_t count, const char *fmt, ...) pg_attribute_printf(3, 4);
extern int pg_vsprintf(char *str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-extern int pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern int pg_sprintf(char *str, const char *fmt, ...) pg_attribute_printf(2, 3);
extern int pg_vfprintf(FILE *stream, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-extern int pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2, 3);
+extern int pg_fprintf(FILE *stream, const char *fmt, ...) pg_attribute_printf(2, 3);
extern int pg_vprintf(const char *fmt, va_list args) pg_attribute_printf(1, 0);
-extern int pg_printf(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int pg_printf(const char *fmt, ...) pg_attribute_printf(1, 2);
#ifndef WIN32
/*
* passing of other special options.
*/
extern HANDLE pgwin32_open_handle(const char *, int, bool);
-extern int pgwin32_open(const char *, int,...);
+extern int pgwin32_open(const char *, int, ...);
extern FILE *pgwin32_fopen(const char *, const char *);
#define open(a,b,c) pgwin32_open(a,b,c)
#define fopen(a,b) pgwin32_fopen(a,b)
*
* This enum can be used for values that want to distinguish between true,
* false, and unset.
-*/
+ */
typedef enum pg_ternary
{
PG_TERNARY_FALSE = 0,
#define HDRSIZETQ ( VARHDRSZ + sizeof(int32) )
-/* Computes the size of header and all QueryItems. size is the number of
+/*
+ * Computes the size of header and all QueryItems. size is the number of
* QueryItems, and lenofoperand is the total length of all operands
*/
#define COMPUTESIZE(size, lenofoperand) ( HDRSIZETQ + (size) * sizeof(QueryItem) + (lenofoperand) )
} DynamicZoneAbbrev;
-/* FMODULO()
+/*
+ * FMODULO()
* Macro to replace modf(), which is broken on some platforms.
* t = input and remainder
* q = integer part
if ((q) != 0) (t) -= rint((q) * (u)); \
} while(0)
-/* TMODULO()
+/*
+ * TMODULO()
* Like FMODULO(), but work on the timestamp datatype (now always int64).
* We assume that int64 follows the C99 semantics for division (negative
* quotients truncate towards zero).
extern int errcode_for_file_access(void);
extern int errcode_for_socket_access(void);
-extern int errmsg(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int errmsg_internal(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int errmsg(const char *fmt, ...) pg_attribute_printf(1, 2);
+extern int errmsg_internal(const char *fmt, ...) pg_attribute_printf(1, 2);
extern int errmsg_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+ unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
-extern int errdetail(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int errdetail_internal(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int errdetail(const char *fmt, ...) pg_attribute_printf(1, 2);
+extern int errdetail_internal(const char *fmt, ...) pg_attribute_printf(1, 2);
-extern int errdetail_log(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int errdetail_log(const char *fmt, ...) pg_attribute_printf(1, 2);
extern int errdetail_log_plural(const char *fmt_singular,
const char *fmt_plural,
- unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+ unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
extern int errdetail_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+ unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
-extern int errhint(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int errhint_internal(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int errhint(const char *fmt, ...) pg_attribute_printf(1, 2);
+extern int errhint_internal(const char *fmt, ...) pg_attribute_printf(1, 2);
extern int errhint_plural(const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
+ unsigned long n, ...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
/*
* errcontext() is typically called in error context callback functions, not
extern int set_errcontext_domain(const char *domain);
-extern int errcontext_msg(const char *fmt,...) pg_attribute_printf(1, 2);
+extern int errcontext_msg(const char *fmt, ...) pg_attribute_printf(1, 2);
extern int errhidestmt(bool hide_stmt);
extern int errhidecontext(bool hide_ctx);
/* Support for constructing error strings separately from ereport() calls */
extern void pre_format_elog_string(int errnumber, const char *domain);
-extern char *format_elog_string(const char *fmt,...) pg_attribute_printf(1, 2);
+extern char *format_elog_string(const char *fmt, ...) pg_attribute_printf(1, 2);
/* Support for attaching context information to error reports */
* not available). Used before ereport/elog can be used
* safely (memory context, GUC load etc)
*/
-extern void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2);
+extern void write_stderr(const char *fmt, ...) pg_attribute_printf(1, 2);
extern void vwrite_stderr(const char *fmt, va_list ap) pg_attribute_printf(1, 0);
#endif /* ELOG_H */
extern char *pchomp(const char *in);
/* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2);
+extern char *psprintf(const char *fmt, ...) pg_attribute_printf(1, 2);
extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0);
#endif /* PALLOC_H */
#include "executor/tuptable.h"
-/* Tuplestorestate is an opaque type whose details are not known outside
+/*
+ * Tuplestorestate is an opaque type whose details are not known outside
* tuplestore.c.
*/
typedef struct Tuplestorestate Tuplestorestate;
}
/*
-*
-* the input for this function is mmddyyyy and any non-numeric
-* character can be used as a separator
-*
-*/
+ *
+ * the input for this function is mmddyyyy and any non-numeric
+ * character can be used as a separator
+ *
+ */
int
rstrdate(const char *str, date * d)
{
-/* dynamic SQL support routines
+/*
+ * dynamic SQL support routines
*
* src/interfaces/ecpg/ecpglib/descriptor.c
*/
}
bool
-ECPGget_desc(int lineno, const char *desc_name, int index,...)
+ECPGget_desc(int lineno, const char *desc_name, int index, ...)
{
va_list args;
PGresult *ECPGresult;
bool
-ECPGset_desc(int lineno, const char *desc_name, int index,...)
+ECPGset_desc(int lineno, const char *desc_name, int index, ...)
{
va_list args;
struct descriptor *desc;
}
bool
-ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name,...)
+ECPGdescribe(int line, int compat, bool input, const char *connection_name, const char *stmt_name, ...)
{
bool ret = false;
struct connection *con;
void ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat);
char *ecpg_prepared(const char *name, struct connection *con);
bool ecpg_deallocate_all_conn(int lineno, enum COMPAT_MODE c, struct connection *con);
-void ecpg_log(const char *format,...) pg_attribute_printf(1, 2);
+void ecpg_log(const char *format, ...) pg_attribute_printf(1, 2);
bool ecpg_auto_prepare(int lineno, const char *connection_name,
const int compat, char **name, const char *query);
bool ecpg_register_prepared_stmt(struct statement *stmt);
#define ecpg_gettext(x) (x)
#endif
-/* SQLSTATE values generated or processed by ecpglib (intentionally
- * not exported -- users should refer to the codes directly) */
+/*
+ * SQLSTATE values generated or processed by ecpglib (intentionally
+ * not exported -- users should refer to the codes directly)
+ */
#define ECPG_SQLSTATE_NO_DATA "02000"
#define ECPG_SQLSTATE_USING_CLAUSE_DOES_NOT_MATCH_PARAMETERS "07001"
* All the tedious messing around with tuples is supposed to be hidden
* by this function.
*/
-/* Author: Linus Tolke
- (actually most if the code is "borrowed" from the distribution and just
- slightly modified)
+/*
+ * Author: Linus Tolke
+ * (actually most if the code is "borrowed" from the distribution and just
+ * slightly modified)
*/
-/* Taken over as part of PostgreSQL by Michael Meskes <meskes@postgresql.org>
- on Feb. 5th, 1998 */
+/*
+ * Taken over as part of PostgreSQL by Michael Meskes <meskes@postgresql.org>
+ * on Feb. 5th, 1998
+ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
* The input/output parameters are passed as variable-length argument list.
*/
bool
-ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
+ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query, ...)
{
va_list args;
bool ret;
}
void
-ecpg_log(const char *format,...)
+ecpg_log(const char *format, ...)
{
va_list ap;
const char *intl_format;
#define ECPG_NO_ERROR 0
#define ECPG_NOT_FOUND 100
-/* system error codes returned by ecpglib get the correct number,
+/*
+ * system error codes returned by ecpglib get the correct number,
* but are made negative
*/
#define ECPG_OUT_OF_MEMORY -ENOMEM
#define ECPG_DUPLICATE_KEY -403
#define ECPG_SUBSELECT_NOT_ONE -404
-/* for compatibility we define some different error codes for the same error
- * if adding a new one make sure to not double define it */
+/*
+ * for compatibility we define some different error codes for the same error
+ * if adding a new one make sure to not double define it
+ */
#define ECPG_INFORMIX_DUPLICATE_KEY -239
#define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
const char *passwd, const char *connection_name, int autocommit);
bool ECPGdo(const int lineno, const int compat, const int force_indicator,
const char *connection_name, const bool questionmarks,
- const int st, const char *query,...);
+ const int st, const char *query, ...);
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction);
bool ECPGdisconnect(int lineno, const char *connection_name);
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks,
bool ECPGdeallocate_desc(int line, const char *name);
bool ECPGallocate_desc(int line, const char *name);
bool ECPGget_desc_header(int lineno, const char *desc_name, int *count);
-bool ECPGget_desc(int lineno, const char *desc_name, int index,...);
+bool ECPGget_desc(int lineno, const char *desc_name, int index, ...);
bool ECPGset_desc_header(int lineno, const char *desc_name, int count);
-bool ECPGset_desc(int lineno, const char *desc_name, int index,...);
+bool ECPGset_desc(int lineno, const char *desc_name, int index, ...);
void ECPGset_noind_null(enum ECPGttype type, void *ptr);
bool ECPGis_noind_null(enum ECPGttype type, const void *ptr);
bool ECPGdescribe(int line, int compat, bool input,
- const char *connection_name, const char *stmt_name,...);
+ const char *connection_name, const char *stmt_name, ...);
void ECPGset_var(int number, void *pointer, int lineno);
void *ECPGget_var(int number);
} datetkn;
-/* FMODULO()
+/*
+ * FMODULO()
* Macro to replace modf(), which is broken on some platforms.
* t = input and remainder
* q = integer part
if ((q) != 0) (t) -= rint((q) * (u)); \
} while(0)
-/* TMODULO()
+/*
+ * TMODULO()
* Like FMODULO(), but work on the timestamp datatype (now always int64).
* We assume that int64 follows the C99 semantics for division (negative
* quotients truncate towards zero).
return NULL;
}
-/* DecodeUnits()
+/*
+ * DecodeUnits()
* Decode text string using lookup table.
* This routine supports time interval decoding.
*/
*month = (quad + 10) % 12 + 1;
} /* j2date() */
-/* DecodeSpecial()
+/*
+ * DecodeSpecial()
* Decode text string using lookup table.
* Implement a cache lookup since it is likely that dates
* will be related in format.
return type;
} /* DecodeSpecial() */
-/* EncodeDateOnly()
+/*
+ * EncodeDateOnly()
* Encode date as local time.
*/
void
}
}
-/* EncodeDateTime()
+/*
+ * EncodeDateTime()
* Encode date and time interpreted as local time.
*
* tm and fsec are the value to encode, print_tz determines whether to include
-/* DecodeNumberField()
+/*
+ * DecodeNumberField()
* Interpret numeric string as a concatenated date or time field.
* Use the context of previously decoded fields to help with
* the interpretation.
} /* DecodeNumberField() */
-/* DecodeNumber()
+/*
+ * DecodeNumber()
* Interpret plain numeric field as a date value in context.
*/
static int
return 0;
} /* DecodeNumber() */
-/* DecodeDate()
+/*
+ * DecodeDate()
* Decode date string which includes delimiters.
* Insist on a complete set of fields.
*/
} /* DecodeDate() */
-/* DecodeTime()
+/*
+ * DecodeTime()
* Decode time string which includes delimiters.
* Only check the lower limit on hours, since this same code
* can be used to represent time spans.
return 0;
} /* DecodeTime() */
-/* DecodeTimezone()
+/*
+ * DecodeTimezone()
* Interpret string as a numeric timezone.
*
* Note: we allow timezone offsets up to 13:59. There are places that
} /* DecodeTimezone() */
-/* DecodePosixTimezone()
+/*
+ * DecodePosixTimezone()
* Interpret string as a POSIX-compatible timezone:
* PST-hh:mm
* PST+h
return 0;
} /* DecodePosixTimezone() */
-/* ParseDateTime()
+/*
+ * ParseDateTime()
* Break string into tokens based on a date/time context.
* Several field types are assigned:
* DTK_NUMBER - digits and (possibly) a decimal point
} /* ParseDateTime() */
-/* DecodeDateTime()
+/*
+ * DecodeDateTime()
* Interpret previously parsed fields for general date and time.
* Return 0 if full date, 1 if only time, and -1 if problems.
* External format(s):
return 0;
} /* DecodeDateTime() */
-/* Function works as follows:
+/*
+ * Function works as follows:
+ *
*
*
- * */
+ */
static char *
find_end_token(char *str, char *fmt)
#include "pgtypes_interval.h"
#include "pgtypeslib_extern.h"
-/* copy&pasted from .../src/backend/utils/adt/datetime.c
+/*
+ * copy&pasted from .../src/backend/utils/adt/datetime.c
* and changed struct pg_tm to struct tm
*/
static void
}
-/* copy&pasted from .../src/backend/utils/adt/datetime.c
+/*
+ * copy&pasted from .../src/backend/utils/adt/datetime.c
* and changed struct pg_tm to struct tm
*/
static void
}
-/* copy&pasted from .../src/backend/utils/adt/datetime.c
+/*
+ * copy&pasted from .../src/backend/utils/adt/datetime.c
* and changed struct pg_tm to struct tm
*/
static inline void
*fsec = 0;
}
-/* copy&pasted from .../src/backend/utils/adt/datetime.c
+/*
+ * copy&pasted from .../src/backend/utils/adt/datetime.c
*
* * changed struct pg_tm to struct tm
*
-/* copy&pasted from .../src/backend/utils/adt/datetime.c
+/*
+ * copy&pasted from .../src/backend/utils/adt/datetime.c
* with 3 exceptions
*
* * changed struct pg_tm to struct tm
}
-/* copy&pasted from .../src/backend/utils/adt/datetime.c
+/*
+ * copy&pasted from .../src/backend/utils/adt/datetime.c
*
* Change pg_tm to tm
*/
}
-/* interval2tm()
+/*
+ * interval2tm()
* Convert an interval data type to a tm structure.
*/
static int
#include "pgtypes_error.h"
-/* These are the constants that decide which printf() format we'll use in
- * order to get a string representation of the value */
+/*
+ * These are the constants that decide which printf() format we'll use in
+ * order to get a string representation of the value
+ */
#define PGTYPES_TYPE_NOTHING 0
#define PGTYPES_TYPE_STRING_MALLOCED 1
#define PGTYPES_TYPE_STRING_CONSTANT 2
return dt;
} /* dt2local() */
-/* tm2timestamp()
+/*
+ * tm2timestamp()
* Convert a tm structure to a timestamp data type.
* Note that year is _not_ 1900-based, but is an explicit full value.
* Also, month is one-based, _not_ zero-based.
return dt;
} /* SetEpochTimestamp() */
-/* timestamp2tm()
+/*
+ * timestamp2tm()
* Convert timestamp data type to POSIX time structure.
* Note that year is _not_ 1900-based, but is an explicit full value.
* Also, month is one-based, _not_ zero-based.
return 0;
} /* timestamp2tm() */
-/* EncodeSpecialTimestamp()
+/*
+ * EncodeSpecialTimestamp()
* * Convert reserved timestamp data type to string.
- * */
+ *
+ */
static void
EncodeSpecialTimestamp(timestamp dt, char *str)
{
}
/*
-* add an interval to a time stamp
-*
-* *tout = tin + span
-*
-* returns 0 if successful
-* returns -1 if it fails
-*
-*/
+ * add an interval to a time stamp
+ *
+ * *tout = tin + span
+ *
+ * returns 0 if successful
+ * returns -1 if it fails
+ *
+ */
int
PGTYPEStimestamp_add_interval(timestamp * tin, interval * span, timestamp * tout)
/*
-* subtract an interval from a time stamp
-*
-* *tout = tin - span
-*
-* returns 0 if successful
-* returns -1 if it fails
-*
-*/
+ * subtract an interval from a time stamp
+ *
+ * *tout = tin - span
+ *
+ * returns 0 if successful
+ * returns -1 if it fails
+ *
+ */
int
PGTYPEStimestamp_sub_interval(timestamp * tin, interval * span, timestamp * tout)
whenever_action(2 | 1);
}
-/* I consider dynamic allocation overkill since at most two descriptor
- variables are possible per statement. (input and output descriptor)
- And descriptors are no normal variables, so they don't belong into
- the variable list.
-*/
+/*
+ * I consider dynamic allocation overkill since at most two descriptor
+ * variables are possible per statement. (input and output descriptor)
+ * And descriptors are no normal variables, so they don't belong into
+ * the variable list.
+ */
#define MAX_DESCRIPTOR_NAMELEN 128
struct variable *
extern char *loc_strdup(const char *string);
extern void reclaim_local_storage(void);
extern char *cat2_str(const char *str1, const char *str2);
-extern char *cat_str(int count,...);
+extern char *cat_str(int count, ...);
extern char *make2_str(const char *str1, const char *str2);
extern char *make3_str(const char *str1, const char *str2, const char *str3);
-extern void mmerror(int error_code, enum errortype type, const char *error,...) pg_attribute_printf(3, 4);
-pg_noreturn extern void mmfatal(int error_code, const char *error,...) pg_attribute_printf(2, 3);
+extern void mmerror(int error_code, enum errortype type, const char *error, ...) pg_attribute_printf(3, 4);
+pg_noreturn extern void mmfatal(int error_code, const char *error, ...) pg_attribute_printf(2, 3);
extern void output_get_descr_header(const char *desc_name);
extern void output_get_descr(const char *desc_name, const char *index);
extern void output_set_descr_header(const char *desc_name);
return NULL;
}
-/* Dump a type.
- The type is dumped as:
- type-tag <comma> - enum ECPGttype
- reference-to-variable <comma> - char *
- size <comma> - long size of this field (if varchar)
- arrsize <comma> - long number of elements in the arr
- offset <comma> - offset to the next element
- Where:
- type-tag is one of the simple types or varchar.
- reference-to-variable can be a reference to a struct element.
- arrsize is the size of the array in case of array fetches. Otherwise 0.
- size is the maxsize in case it is a varchar. Otherwise it is the size of
- the variable (required to do array fetches of structs).
+/*
+ * Dump a type.
+ * The type is dumped as:
+ * type-tag <comma> - enum ECPGttype
+ * reference-to-variable <comma> - char *
+ * size <comma> - long size of this field (if varchar)
+ * arrsize <comma> - long number of elements in the arr
+ * offset <comma> - offset to the next element
+ * Where:
+ * type-tag is one of the simple types or varchar.
+ * reference-to-variable can be a reference to a struct element.
+ * arrsize is the size of the array in case of array fetches. Otherwise 0.
+ * size is the maxsize in case it is a varchar. Otherwise it is the size of
+ * the variable (required to do array fetches of structs).
*/
static void ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
char *varcharsize,
}
-/* If size is NULL, then the offset is 0, if not use size as a
- string, it represents the offset needed if we are in an array of structs. */
+/*
+ * If size is NULL, then the offset is 0, if not use size as a
+ * string, it represents the offset needed if we are in an array of structs.
+ */
static void
ECPGdump_a_simple(FILE *o, const char *name, enum ECPGttype type,
char *varcharsize,
void ECPGfree_struct_member(struct ECPGstruct_member *rm);
void ECPGfree_type(struct ECPGtype *type);
-/* Dump a type.
- The type is dumped as:
- type-tag <comma> reference-to-variable <comma> arrsize <comma> size <comma>
- Where:
- type-tag is one of the simple types or varchar.
- reference-to-variable can be a reference to a struct element.
- arrsize is the size of the array in case of array fetches. Otherwise 0.
- size is the maxsize in case it is a varchar. Otherwise it is the size of
- the variable (required to do array fetches of structs).
+/*
+ * Dump a type.
+ * The type is dumped as:
+ * type-tag <comma> reference-to-variable <comma> arrsize <comma> size <comma>
+ * Where:
+ * type-tag is one of the simple types or varchar.
+ * reference-to-variable can be a reference to a struct element.
+ * arrsize is the size of the array in case of array fetches. Otherwise 0.
+ * size is the maxsize in case it is a varchar. Otherwise it is the size of
+ * the variable (required to do array fetches of structs).
*/
void ECPGdump_a_type(FILE *o, const char *name, struct ECPGtype *type,
const int brace_level, const char *ind_name,
/* Report an error or warning */
void
-mmerror(int error_code, enum errortype type, const char *error,...)
+mmerror(int error_code, enum errortype type, const char *error, ...)
{
va_list ap;
/* Report an error and abandon execution */
void
-mmfatal(int error_code, const char *error,...)
+mmfatal(int error_code, const char *error, ...)
{
va_list ap;
* Concatenate N strings, inserting spaces between them unless they are empty
*/
char *
-cat_str(int count,...)
+cat_str(int count, ...)
{
va_list args;
int i;
argsresult = NULL;
}
-/* Insert a new variable into our request list.
+/*
+ * Insert a new variable into our request list.
* Note: The list is dumped from the end,
- * so we have to add new entries at the beginning */
+ * so we have to add new entries at the beginning
+ */
void
add_variable_to_head(struct arguments **list, struct variable *var, struct variable *ind)
{
}
}
-/* Dump out a list of all the variable on this list.
- This is a recursive function that works from the end of the list and
- deletes the list as we go on.
+/*
+ * Dump out a list of all the variable on this list.
+ * This is a recursive function that works from the end of the list and
+ * deletes the list as we go on.
*/
void
dump_variables(struct arguments *list, int mode)
* a trailing newline, and should not be more than one line).
*/
void
-pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...)
+pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt, ...)
{
char msgBuf[1024];
va_list args;
return res->tuples[tup_num][field_num].value;
}
-/* PQgetlength:
+/*
+ * PQgetlength:
* returns the actual length of a field value in bytes.
*/
int
return 0;
}
-/* PQgetisnull:
+/*
+ * PQgetisnull:
* returns the null status of a field value.
*/
int
return 0;
}
-/* PQnparams:
+/*
+ * PQnparams:
* returns the number of input parameters of a prepared statement.
*/
int
return res->numParameters;
}
-/* PQparamtype:
+/*
+ * PQparamtype:
* returns type Oid of the specified statement parameter.
*/
Oid
}
-/* PQsetnonblocking:
+/*
+ * PQsetnonblocking:
* sets the PGconn's database connection non-blocking if the arg is true
* or makes it blocking if the arg is false, this will not protect
* you from PQexec(), you'll only be safe when using the non-blocking API.
* newline.
*/
void
-libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...)
+libpq_append_error(PQExpBuffer errorMessage, const char *fmt, ...)
{
int save_errno = errno;
bool done;
* format should not end with a newline.
*/
void
-libpq_append_conn_error(PGconn *conn, const char *fmt,...)
+libpq_append_conn_error(PGconn *conn, const char *fmt, ...)
{
int save_errno = errno;
bool done;
PQAUTHDATA_OAUTH_BEARER_TOKEN_V2, /* newest API for OAuth Bearer tokens */
} PGauthData;
-/* PGconn encapsulates a connection to the backend.
+/*
+ * PGconn encapsulates a connection to the backend.
* The contents of this struct are not supposed to be known to applications.
*/
typedef struct pg_conn PGconn;
-/* PGcancelConn encapsulates a cancel connection to the backend.
+/*
+ * PGcancelConn encapsulates a cancel connection to the backend.
* The contents of this struct are not supposed to be known to applications.
*/
typedef struct pg_cancel_conn PGcancelConn;
-/* PGresult encapsulates the result of a query (or more precisely, of a single
+/*
+ * PGresult encapsulates the result of a query (or more precisely, of a single
* SQL command --- a query string given to PQsendQuery can contain multiple
* commands and thus return multiple PGresult objects).
* The contents of this struct are not supposed to be known to applications.
*/
typedef struct pg_result PGresult;
-/* PGcancel encapsulates the information needed to cancel a running
+/*
+ * PGcancel encapsulates the information needed to cancel a running
* query on an existing connection.
* The contents of this struct are not supposed to be known to applications.
*/
typedef struct pg_cancel PGcancel;
-/* PGnotify represents the occurrence of a NOTIFY message.
+/*
+ * PGnotify represents the occurrence of a NOTIFY message.
* Ideally this would be an opaque typedef, but it's so simple that it's
* unlikely to change.
* NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
extern const char *const *PQsslAttributeNames(PGconn *conn);
-/* Get the OpenSSL structure associated with a connection. Returns NULL for
- * unencrypted connections or if any other TLS library is in use. */
+/*
+ * Get the OpenSSL structure associated with a connection. Returns NULL for
+ * unencrypted connections or if any other TLS library is in use.
+ */
extern void *PQgetssl(PGconn *conn);
/* Tell libpq whether it needs to initialize OpenSSL */
* hence there is no need for multiple descriptor sets.
*/
-/* Subsidiary-storage management structure for PGresult.
+/*
+ * Subsidiary-storage management structure for PGresult.
* See space management routines in fe-exec.c for details.
* Note that space[k] refers to the k'th byte starting from the physical
* head of the block --- it's a union, not a struct!
Oid fn_lo_write; /* OID of backend function LOwrite */
} PGlobjfuncs;
-/* PGdataValue represents a data field value being passed to a row processor.
+/*
+ * PGdataValue represents a data field value being passed to a row processor.
* It could be either text or binary data; text data is not zero-terminated.
* A SQL NULL is represented by len < 0; then value is still valid but there
* are no data bytes there.
};
-/* String descriptions of the ExecStatusTypes.
+/*
+ * String descriptions of the ExecStatusTypes.
* direct use of this array is deprecated; call PQresStatus() instead.
*/
extern char *const pgresStatus[];
extern void pqClearAsyncResult(PGconn *conn);
extern void pqSaveErrorResult(PGconn *conn);
extern PGresult *pqPrepareAsyncResult(PGconn *conn);
-extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt, ...) pg_attribute_printf(2, 3);
extern void pqSaveMessageField(PGresult *res, char code,
const char *value);
extern int pqSaveParameterStatus(PGconn *conn, const char *name,
*/
#undef _
-extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...) pg_attribute_printf(2, 3);
-extern void libpq_append_conn_error(PGconn *conn, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt, ...) pg_attribute_printf(2, 3);
+extern void libpq_append_conn_error(PGconn *conn, const char *fmt, ...) pg_attribute_printf(2, 3);
extern void libpq_append_grease_info(PGconn *conn);
/*
* resetPQExpBuffer() followed by appendPQExpBuffer().
*/
void
-printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
+printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...)
{
int save_errno = errno;
va_list args;
* strcat.
*/
void
-appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
+appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...)
{
int save_errno = errno;
va_list args;
* This is a convenience routine that does the same thing as
* resetPQExpBuffer() followed by appendPQExpBuffer().
*/
-extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt, ...) pg_attribute_printf(2, 3);
/*------------------------
* appendPQExpBuffer
* to str if necessary. This is sort of like a combination of sprintf and
* strcat.
*/
-extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
+extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt, ...) pg_attribute_printf(2, 3);
/*------------------------
* appendPQExpBufferVA
* in the context.
*/
void
-PLy_elog_impl(int elevel, const char *fmt,...)
+PLy_elog_impl(int elevel, const char *fmt, ...)
{
int save_errno = errno;
char *volatile xmsg = NULL;
/* call PyErr_SetString with a vprint interface and translation support */
void
-PLy_exception_set(PyObject *exc, const char *fmt,...)
+PLy_exception_set(PyObject *exc, const char *fmt, ...)
{
char buf[1024];
va_list ap;
void
PLy_exception_set_plural(PyObject *exc,
const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...)
+ unsigned long n, ...)
{
char buf[1024];
va_list ap;
Py_XDECREF(val);
}
-/* set an object attribute to a string value, returns true when the set was
+/*
+ * set an object attribute to a string value, returns true when the set was
* successful
*/
static bool
} while(0)
#endif /* HAVE__BUILTIN_CONSTANT_P */
-extern PGDLLEXPORT void PLy_elog_impl(int elevel, const char *fmt,...) pg_attribute_printf(2, 3);
+extern PGDLLEXPORT void PLy_elog_impl(int elevel, const char *fmt, ...) pg_attribute_printf(2, 3);
-extern PGDLLEXPORT void PLy_exception_set(PyObject *exc, const char *fmt,...) pg_attribute_printf(2, 3);
+extern PGDLLEXPORT void PLy_exception_set(PyObject *exc, const char *fmt, ...) pg_attribute_printf(2, 3);
extern PGDLLEXPORT void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural,
- unsigned long n,...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5);
+ unsigned long n, ...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5);
extern PGDLLEXPORT void PLy_exception_set_with_details(PyObject *excclass, ErrorData *edata);
return rv;
}
-/* trigger subhandler
+/*
+ * trigger subhandler
*
* the python function is expected to return Py_None if the tuple is
* acceptable and unmodified. Otherwise it should return a PyUnicode
static void PLy_spi_exception_set(PyObject *excclass, ErrorData *edata);
-/* prepare(query="select * from foo")
+/*
+ * prepare(query="select * from foo")
* prepare(query="select * from foo where bar = $1", params=["text"])
* prepare(query="select * from foo where bar = $1", params=["text"], limit=5)
*/
return (PyObject *) plan;
}
-/* execute(query="select * from foo", limit=5)
+/*
+ * execute(query="select * from foo", limit=5)
* execute(plan=plan, values=(foo, bar), limit=5)
*/
PyObject *
#define HAVE_SNPRINTF 1
#if defined(_MSC_VER) && defined(_DEBUG)
-/* Python uses #pragma to bring in a non-default libpython on VC++ if
- * _DEBUG is defined */
+/*
+ * Python uses #pragma to bring in a non-default libpython on VC++ if
+ * _DEBUG is defined
+ */
#undef _DEBUG
/* Also hide away errcode, since we load Python.h before postgres.h */
#define errcode __msvc_errcode
* Check if _pglstat64()'s reason for failure was STATUS_DELETE_PENDING.
* This doesn't apply to Cygwin, which has its own lstat() that would report
* the case as EACCES.
-*/
+ */
static bool
lstat_error_was_status_delete_pending(void)
{
-/* src/port/inet_aton.c
+/*
+ * src/port/inet_aton.c
*
* This inet_aton() function was taken from the GNU C library and
* incorporated into Postgres for those systems which do not have this
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE. */
+ * SUCH DAMAGE.
+ */
#include "c.h"
}
int
-pgwin32_open(const char *fileName, int fileFlags,...)
+pgwin32_open(const char *fileName, int fileFlags, ...)
{
HANDLE h;
int fd;
*/
#if defined(USE_SIGACTION) && defined(USE_SIGINFO)
static void
-wrapper_handler(int postgres_signal_arg, siginfo_t * info, void *context)
+wrapper_handler(int postgres_signal_arg, siginfo_t *info, void *context)
#else /* no USE_SIGINFO */
static void
wrapper_handler(int postgres_signal_arg)
}
int
-pg_snprintf(char *str, size_t count, const char *fmt,...)
+pg_snprintf(char *str, size_t count, const char *fmt, ...)
{
int len;
va_list args;
}
int
-pg_sprintf(char *str, const char *fmt,...)
+pg_sprintf(char *str, const char *fmt, ...)
{
int len;
va_list args;
}
int
-pg_fprintf(FILE *stream, const char *fmt,...)
+pg_fprintf(FILE *stream, const char *fmt, ...)
{
int len;
va_list args;
}
int
-pg_printf(const char *fmt,...)
+pg_printf(const char *fmt, ...)
{
int len;
va_list args;
/*
* src/port/strlcat.c
*
- * $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
+ * $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $
+ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
/*
* src/port/strsep.c
*
- * $OpenBSD: strsep.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
+ * $OpenBSD: strsep.c,v 1.8 2015/08/31 02:53:57 guenther Exp $
+ */
/*-
* Copyright (c) 1990, 1993
#include "postgres_fe.h"
#endif
-static void log_error(const char *fmt,...) pg_attribute_printf(1, 2);
+static void log_error(const char *fmt, ...) pg_attribute_printf(1, 2);
/*
* message.
*/
static void
-log_error(const char *fmt,...)
+log_error(const char *fmt, ...)
{
va_list ap;
*/
/*
-
- test-ctype.c
-
-Written by Oleg BroytMann, phd2@earthling.net
- with help from Oleg Bartunov, oleg@sai.msu.su
-Copyright (C) 1998 PhiloSoft Design
-
-This is copyrighted but free software. You can use it, modify and distribute
-in original or modified form providing that the author's names and the above
-copyright notice will remain.
-
-Disclaimer, legal notice and absence of warranty.
- This software provided "as is" without any kind of warranty. In no event
-the author shall be liable for any damage, etc.
-
-*/
+ *
+ * test-ctype.c
+ *
+ * Written by Oleg BroytMann, phd2@earthling.net
+ * with help from Oleg Bartunov, oleg@sai.msu.su
+ * Copyright (C) 1998 PhiloSoft Design
+ *
+ * This is copyrighted but free software. You can use it, modify and distribute
+ * in original or modified form providing that the author's names and the above
+ * copyright notice will remain.
+ *
+ * Disclaimer, legal notice and absence of warranty.
+ * This software provided "as is" without any kind of warranty. In no event
+ * the author shall be liable for any damage, etc.
+ *
+ */
#include <stdio.h>
#include <locale.h>
static void exit_nicely(PGconn *conn);
-pg_noreturn static void pg_fatal_impl(int line, const char *fmt,...)
+pg_noreturn static void pg_fatal_impl(int line, const char *fmt, ...)
pg_attribute_printf(2, 3);
static bool process_result(PGconn *conn, PGresult *res, int results,
int numsent);
*/
#define pg_fatal(...) pg_fatal_impl(__LINE__, __VA_ARGS__)
pg_noreturn static void
-pg_fatal_impl(int line, const char *fmt,...)
+pg_fatal_impl(int line, const char *fmt, ...)
{
va_list args;
* on TopMemoryContext, otherwise on DSA. Although the tidstore
* is created on DSA, only the same process can subsequently use
* the tidstore. The tidstore handle is not shared anywhere.
-*/
+ */
Datum
test_create(PG_FUNCTION_ARGS)
{
static void test_status_print(bool ok, const char *testname, double runtime, bool parallel);
static void test_status_ok(const char *testname, double runtime, bool parallel);
static void test_status_failed(const char *testname, double runtime, bool parallel);
-static void bail_out(bool noatexit, const char *fmt,...) pg_attribute_printf(2, 3);
-static void emit_tap_output(TAPtype type, const char *fmt,...) pg_attribute_printf(2, 3);
+static void bail_out(bool noatexit, const char *fmt, ...) pg_attribute_printf(2, 3);
+static void emit_tap_output(TAPtype type, const char *fmt, ...) pg_attribute_printf(2, 3);
static void emit_tap_output_v(TAPtype type, const char *fmt, va_list argp) pg_attribute_printf(2, 0);
static StringInfo psql_start_command(void);
-static void psql_add_command(StringInfo buf, const char *query,...) pg_attribute_printf(2, 3);
+static void psql_add_command(StringInfo buf, const char *query, ...) pg_attribute_printf(2, 3);
static void psql_end_command(StringInfo buf, const char *database);
/*
* exit handlers, thus avoid any risk of bottomless recursion calls to exit.
*/
static void
-bail_out(bool noatexit, const char *fmt,...)
+bail_out(bool noatexit, const char *fmt, ...)
{
va_list ap;
static void
-emit_tap_output(TAPtype type, const char *fmt,...)
+emit_tap_output(TAPtype type, const char *fmt, ...)
{
va_list argp;
}
static void
-psql_add_command(StringInfo buf, const char *query,...)
+psql_add_command(StringInfo buf, const char *query, ...)
{
StringInfoData cmdbuf;
const char *cmdptr;
PG_RETURN_BOOL(salary > 699);
}
-/* New type "widget"
+/*
+ * New type "widget"
* This used to be "circle", but I added circle to builtins,
* so needed to make sure the names do not collide. - tgl 97/04/21
*/
/* We don't need the "fullname" member */
};
-/* Load tz data from the file named NAME into *SP. Read extended
+/*
+ * Load tz data from the file named NAME into *SP. Read extended
* format if DOEXTEND. Use *LSP for temporary storage. Return 0 on
* success, an errno value on failure.
* PG: If "canonname" is not NULL, then on success the canonical spelling of
return 0;
}
-/* Load tz data from the file named NAME into *SP. Read extended
+/*
+ * Load tz data from the file named NAME into *SP. Read extended
* format if DOEXTEND. Return 0 on success, an errno value on failure.
* PG: If "canonname" is not NULL, then on success the canonical spelling of
* given name is stored there (the buffer must be > TZ_STRLEN_MAX bytes!).
#define _Alignof(type) offsetof(struct { char a; type b; }, b)
#endif
-/* The type for line numbers. Use PRIdMAX to format them; formerly
- there was also "#define PRIdLINENO PRIdMAX" and formats used
- PRIdLINENO, but xgettext cannot grok that. */
+/*
+ * The type for line numbers. Use PRIdMAX to format them; formerly
+ * there was also "#define PRIdLINENO PRIdMAX" and formats used
+ * PRIdLINENO, but xgettext cannot grok that.
+ */
typedef intmax_t lineno_t;
struct rule
#endif
static void verror(const char *const string, va_list args) pg_attribute_printf(1, 0);
-static void error(const char *const string,...) pg_attribute_printf(1, 2);
-static void warning(const char *const string,...) pg_attribute_printf(1, 2);
+static void error(const char *const string, ...) pg_attribute_printf(1, 2);
+static void warning(const char *const string, ...) pg_attribute_printf(1, 2);
static void addtt(zic_t starttime, int type);
static int addtype(zic_t utoff, char const *abbr,
bool isdst, bool ttisstd, bool ttisut);
{
PERCENT_Z_LEN_BOUND = sizeof "+995959" - 1};
-/* If true, work around a bug in Qt 5.6.1 and earlier, which mishandles
- TZif files whose POSIX-TZ-style strings contain '<'; see
- QTBUG-53071 <https://bugreports.qt.io/browse/QTBUG-53071>. This
- workaround will no longer be needed when Qt 5.6.1 and earlier are
- obsolete, say in the year 2021. */
+/*
+ * If true, work around a bug in Qt 5.6.1 and earlier, which mishandles
+ * TZif files whose POSIX-TZ-style strings contain '<'; see
+ * QTBUG-53071 <https://bugreports.qt.io/browse/QTBUG-53071>. This
+ * workaround will no longer be needed when Qt 5.6.1 and earlier are
+ * obsolete, say in the year 2021.
+ */
#ifndef WORK_AROUND_QTBUG_53071
enum
{
}
static void
-error(const char *const string,...)
+error(const char *const string, ...)
{
va_list args;
}
static void
-warning(const char *const string,...)
+warning(const char *const string, ...)
{
va_list args;
exit(status);
}
-/* Change the working directory to DIR, possibly creating DIR and its
- ancestors. After this is done, all files are accessed with names
- relative to DIR. */
+/*
+ * Change the working directory to DIR, possibly creating DIR and its
+ * ancestors. After this is done, all files are accessed with names
+ * relative to DIR.
+ */
static void
change_directory(char const *dir)
{
static zic_t const min_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE);
static zic_t const max_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
-/* The minimum, and one less than the maximum, values specified by
- the -r option. These default to MIN_TIME and MAX_TIME. */
+/*
+ * The minimum, and one less than the maximum, values specified by
+ * the -r option. These default to MIN_TIME and MAX_TIME.
+ */
static zic_t lo_time = MINVAL(zic_t, TIME_T_BITS_IN_FILE);
static zic_t hi_time = MAXVAL(zic_t, TIME_T_BITS_IN_FILE);
/* The time specified by an #expires comment, or negative if no such line. */
static zic_t comment_leapexpires = -1;
-/* Set the time range of the output to TIMERANGE.
- Return true if successful. */
+/*
+ * Set the time range of the output to TIMERANGE.
+ * Return true if successful.
+ */
static bool
timerange_option(char *timerange)
{
static const char *leapsec;
static const char *tzdefault;
-/* -1 if the TZif output file should be slim, 0 if default, 1 if the
- output should be fat for backward compatibility. ZIC_BLOAT_DEFAULT
- determines the default. */
+/*
+ * -1 if the TZif output file should be slim, 0 if default, 1 if the
+ * output should be fat for backward compatibility. ZIC_BLOAT_DEFAULT
+ * determines the default.
+ */
static int bloat;
static bool
}
#endif /* HAVE_SYMLINK */
-/* Hard link FROM to TO, following any symbolic links.
- Return 0 if successful, an error number otherwise. */
+/*
+ * Hard link FROM to TO, following any symbolic links.
+ * Return 0 if successful, an error number otherwise.
+ */
static int
hardlinkerr(char const *target, char const *linkname)
{
}
}
-/* If A is an uppercase character in the C locale, return its lowercase
- counterpart. Otherwise, return A. */
+/*
+ * If A is an uppercase character in the C locale, return its lowercase
+ * counterpart. Otherwise, return A.
+ */
static char
lowerit(char a)
{
charcnt += i;
}
-/* Ensure that the directories of ARGNAME exist, by making any missing
- ones. If ANCESTORS, do this only for ARGNAME's ancestors; otherwise,
- do it for ARGNAME too. Exit with failure if there is trouble.
- Do not consider an existing non-directory to be trouble. */
+/*
+ * Ensure that the directories of ARGNAME exist, by making any missing
+ * ones. If ANCESTORS, do this only for ARGNAME's ancestors; otherwise,
+ * do it for ARGNAME too. Exit with failure if there is trouble.
+ * Do not consider an existing non-directory to be trouble.
+ */
static void
mkdirs(char const *argname, bool ancestors)
{
ASN1_OCTET_STRING
ASN1_STRING
ATAlterConstraint
-AttrResultArgMap
AV
A_ArrayExpr
A_Const
AttrMap
AttrMissing
AttrNumber
+AttrResultArgMap
AttributeOpts
AuthRequest
AuthToken
BufferAccessStrategyType
BufferCacheOsPagesContext
BufferCacheOsPagesRec
-BufferCachePagesContext
-BufferCachePagesRec
BufferDesc
BufferDescPadded
BufferHeapTupleTableSlot
Clump
ClusterInfo
ClusterParams
-ClusterStmt
CmdType
CoalesceExpr
CoerceParamHook
ConditionVariable
ConditionVariableMinimallyPadded
ConditionalStack
+ConditionalStackData
ConfigData
ConfigVariable
ConflictTupleInfo
CustomScanMethods
CustomScanState
CycleCtr
-DataChecksumsWorkerOperation
DBState
-DbOidName
DCHCacheEntry
DEADLOCK_INFO
DECountItem
DSMRegistryCtxStruct
DSMRegistryEntry
DWORD
+DWORD64
DataChecksumsStateStruct
DataChecksumsWorkerDatabase
+DataChecksumsWorkerOperation
DataChecksumsWorkerResult
DataDirSyncMethod
DataDumperPtr
DataPageDeleteStack
-DdlOptType
-DdlOption
DataTypesUsageChecks
DataTypesUsageVersionCheck
DatabaseInfo
DbInfo
DbInfoArr
DbLocaleInfo
+DbOidName
+DdlOptType
+DdlOption
DeClonePtrType
DeadLockState
DeallocateStmt
ExplainForeignScan_function
ExplainFormat
ExplainOneQuery_hook_type
+ExplainOptionGUCCheckHandler
ExplainOptionHandler
ExplainSerializeOption
ExplainState
ExtensionLocation
ExtensionSiblingCache
ExtensionVersionInfo
-FastPathMeta
FDWCollateState
FD_SET
FILE
FSMPageData
FakeRelCacheEntry
FakeRelCacheEntryData
+FastPathMeta
FastPathStrongRelationLockData
FdwInfo
FdwRoutine
FormData_pg_constraint
FormData_pg_conversion
FormData_pg_database
+FormData_pg_db_role_setting
FormData_pg_default_acl
FormData_pg_depend
FormData_pg_enum
Form_pg_constraint
Form_pg_conversion
Form_pg_database
+Form_pg_db_role_setting
Form_pg_default_acl
Form_pg_depend
Form_pg_enum
Form_pg_partitioned_table
Form_pg_policy
Form_pg_proc
+Form_pg_propgraph_element
+Form_pg_propgraph_element_label
+Form_pg_propgraph_label
+Form_pg_propgraph_label_property
+Form_pg_propgraph_property
Form_pg_publication
Form_pg_publication_namespace
Form_pg_publication_rel
HeapTupleHeaderData
HeapTupleTableSlot
HistControl
+HostCacheEntry
HostsFileLoadResult
HostsLine
HotStandbyState
ImportForeignSchemaStmt
ImportForeignSchemaType
ImportForeignSchema_function
+ImportForeignStatistics_function
ImportQual
InProgressEnt
InProgressIO
IndexFetchHeapData
IndexFetchTableData
IndexInfo
-IndexInsertState
IndexList
IndexOnlyScan
IndexOnlyScanState
LocalBufferLookupEnt
LocalPgBackendStatus
LocalTransactionId
+Location
LocationIndex
LocationLen
LockAcquireResult
OffsetNumber
OffsetVarNodes_context
Oid
+Oid8
OidOptions
OkeysState
OldMultiXactReader
PVOID
PVShared
PVSharedCostParams
-PVWorkerUsage
PVWorkerStats
+PVWorkerUsage
PX_Alias
PX_Cipher
PX_Combo
RWConflict
RWConflictData
RWConflictPoolHeader
+RadixSortInfo
Range
RangeBound
RangeBox
RelptrFreePageBtree
RelptrFreePageManager
RelptrFreePageSpanLeader
+RemoteAttributeMapping
RemoteSlot
+RemoteStatsResults
RenameStmt
ReopenPtrType
ReorderBuffer
SMgrRelation
SMgrRelationData
SMgrSortArray
+SN_local
SOCKADDR
SOCKET
SPELL
ShippableCacheEntry
ShippableCacheKey
ShmemAllocatorData
+ShmemAttachCallback
ShmemCallbacks
-ShmemIndexEnt
ShmemHashOpts
+ShmemIndexEnt
+ShmemInitCallback
ShmemRequest
+ShmemRequestCallback
ShmemRequestKind
ShmemStructOpts
ShutdownForeignScan_function
StartLOsPtrType
StartReplicationCmd
StartupStatusEnum
+StatApproxReadStreamPrivate
StatEntry
StatExtEntry
-StatApproxReadStreamPrivate
StateFileChunk
StatisticExtInfo
StatsBuildData
SyncRequestType
SyncStandbySlotsConfigData
SyncingRelationsState
+SysCacheIdentifier
SysFKRelationship
SysScanDesc
SysScanDescData
brin_serialize_callback_type
btree_gin_convert_function
btree_gin_leftmost_function
+build_simple_rel_hook_type
bytea
cached_re_str
canonicalize_state
generate_subscripts_fctx
get_attavgwidth_hook_type
get_index_stats_hook_type
-get_relation_info_hook_type
get_relation_stats_hook_type
gid_t
gin_leafpage_items_state
heap_page_items_state
help_handler
hlCheck
+host_cache_hash
hstoreCheckKeyLen_t
hstoreCheckValLen_t
hstorePairs_t
itemIdCompactData
iterator
jmp_buf
+join_path_setup_hook_type
join_search_hook_type
+joinrel_setup_hook_type
json_aelem_action
json_manifest_error_callback
json_manifest_per_file_callback
json_struct_action
keepwal_entry
keepwal_hash
-keyEntryData
key_t
lclContext
lclTocEntry
macKEY
macaddr
macaddr8
-macaddr_sortsupport_state
manifest_data
manifest_file
manifest_files_hash
multirange_bsearch_comparison
multirange_unnest_fctx
mxact
-mxtruncinfo
needs_fmgr_hook_type
network_sortsupport_state
nl_item
pendingPosition
pending_label
pgParameterStatus
-pgoff_t
pg_atomic_flag
pg_atomic_uint32
pg_atomic_uint64
pg_mb_radix_tree
pg_md5_ctx
pg_on_exit_callback
+pg_plan_advice_advisor_hook
pg_prng_state
pg_re_flags
pg_regex_t
pg_uuid_t
pg_wchar
pg_wchar_tbl
+pgoff_t
pgp_armor_headers_state
pgpa_advice_item
pgpa_advice_tag_type
pgpa_advice_target
pgpa_identifier
pgpa_index_target
-pgpa_index_type
pgpa_itm_type
pgpa_jo_outcome
-pgpa_join_class
pgpa_join_member
pgpa_join_state
pgpa_join_strategy
pgpa_trove_result
pgpa_trove_slice
pgpa_unrolled_join
+pgpa_yy_extra_type
pgsa_entry
pgsa_entry_key
pgsa_saved_entry
pgsa_saved_stash
pgsa_saved_stash_table_hash
+pgsa_saved_stash_table_iterator
pgsa_shared_state
pgsa_stash
pgsa_stash_count
+pgsa_stash_count_table_hash
pgsa_stash_name
+pgsa_stash_name_table_hash
pgsa_writer_context
pgsocket
pgsql_thing_t
postprocess_result_function
pqbool
pqsigfunc
+pqsigfunc_legacy
printQueryOpt
printTableContent
printTableFooter
qsort_arg_comparator
qsort_comparator
query_pathkeys_callback
-RadixSortInfo
rangeTableEntry_used_context
rank_context
rbt_allocfunc
relopt_type
relopt_value
relopts_validator
-RemoteAttributeMapping
remoteConn
remoteConnHashEnt
remoteDep
-RemoteStatsResults
remove_nulling_relids_context
rendezvousHashEntry
rep
shmem_request_hook_type
shmem_startup_hook_type
sig_atomic_t
+siginfo_t
sigjmp_buf
signedbitmapword
sigset_t
/*
* src/tutorial/complex.c
*
- ******************************************************************************
- This file contains routines that can be bound to a Postgres backend and
- called by the backend in the process of processing queries. The calling
- format for these routines is dictated by Postgres architecture.
-******************************************************************************/
+ *
+ * This file contains routines that can be bound to a Postgres backend and
+ * called by the backend in the process of processing queries. The calling
+ * format for these routines is dictated by Postgres architecture.
+ */
#include "postgres.h"