mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Remove tabs after spaces in C comments
This was not changed in HEAD, but will be done later as part of a pgindent run. Future pgindent runs will also do this. Report by Tom Lane Backpatch through all supported branches, but not HEAD
This commit is contained in:
@ -95,7 +95,7 @@ gbt_intv_dist(const void *a, const void *b)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* INTERVALSIZE should be the actual size-on-disk of an Interval, as shown
|
* INTERVALSIZE should be the actual size-on-disk of an Interval, as shown
|
||||||
* in pg_type. This might be less than sizeof(Interval) if the compiler
|
* in pg_type. This might be less than sizeof(Interval) if the compiler
|
||||||
* insists on adding alignment padding at the end of the struct.
|
* insists on adding alignment padding at the end of the struct.
|
||||||
*/
|
*/
|
||||||
#define INTERVALSIZE 16
|
#define INTERVALSIZE 16
|
||||||
|
@ -561,7 +561,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
|
|||||||
rt_cube_size(datum_r, &size_r);
|
rt_cube_size(datum_r, &size_r);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now split up the regions between the two seeds. An important property
|
* Now split up the regions between the two seeds. An important property
|
||||||
* of this split algorithm is that the split vector v has the indices of
|
* of this split algorithm is that the split vector v has the indices of
|
||||||
* items to be split in order in its left and right vectors. We exploit
|
* items to be split in order in its left and right vectors. We exploit
|
||||||
* this property by doing a merge in the code that actually splits the
|
* this property by doing a merge in the code that actually splits the
|
||||||
@ -577,7 +577,7 @@ g_cube_picksplit(PG_FUNCTION_ARGS)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If we've already decided where to place this item, just put it on
|
* If we've already decided where to place this item, just put it on
|
||||||
* the right list. Otherwise, we need to figure out which page needs
|
* the right list. Otherwise, we need to figure out which page needs
|
||||||
* the least enlargement in order to store the item.
|
* the least enlargement in order to store the item.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2397,7 +2397,7 @@ get_tuple_of_interest(Relation rel, int *pkattnums, int pknumatts, char **src_pk
|
|||||||
* Build sql statement to look up tuple of interest, ie, the one matching
|
* Build sql statement to look up tuple of interest, ie, the one matching
|
||||||
* src_pkattvals. We used to use "SELECT *" here, but it's simpler to
|
* src_pkattvals. We used to use "SELECT *" here, but it's simpler to
|
||||||
* generate a result tuple that matches the table's physical structure,
|
* generate a result tuple that matches the table's physical structure,
|
||||||
* with NULLs for any dropped columns. Otherwise we have to deal with two
|
* with NULLs for any dropped columns. Otherwise we have to deal with two
|
||||||
* different tupdescs and everything's very confusing.
|
* different tupdescs and everything's very confusing.
|
||||||
*/
|
*/
|
||||||
appendStringInfoString(&buf, "SELECT ");
|
appendStringInfoString(&buf, "SELECT ");
|
||||||
@ -2623,7 +2623,7 @@ dblink_security_check(PGconn *conn, remoteConn *rconn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For non-superusers, insist that the connstr specify a password. This
|
* For non-superusers, insist that the connstr specify a password. This
|
||||||
* prevents a password from being picked up from .pgpass, a service file,
|
* prevents a password from being picked up from .pgpass, a service file,
|
||||||
* the environment, etc. We don't want the postgres user's passwords
|
* the environment, etc. We don't want the postgres user's passwords
|
||||||
* to be accessible to non-superusers.
|
* to be accessible to non-superusers.
|
||||||
|
@ -91,7 +91,7 @@ geo_distance_internal(Point *pt1, Point *pt2)
|
|||||||
* distance between the points in miles on earth's surface
|
* distance between the points in miles on earth's surface
|
||||||
*
|
*
|
||||||
* If float8 is passed-by-value, the oldstyle version-0 calling convention
|
* If float8 is passed-by-value, the oldstyle version-0 calling convention
|
||||||
* is unportable, so we use version-1. However, if it's passed-by-reference,
|
* is unportable, so we use version-1. However, if it's passed-by-reference,
|
||||||
* continue to use oldstyle. This is just because we'd like earthdistance
|
* continue to use oldstyle. This is just because we'd like earthdistance
|
||||||
* to serve as a canary for any unintentional breakage of version-0 functions
|
* to serve as a canary for any unintentional breakage of version-0 functions
|
||||||
* with float8 results.
|
* with float8 results.
|
||||||
|
@ -478,7 +478,7 @@ fileGetForeignPaths(PlannerInfo *root,
|
|||||||
&startup_cost, &total_cost);
|
&startup_cost, &total_cost);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a ForeignPath node and add it as only possible path. We use the
|
* Create a ForeignPath node and add it as only possible path. We use the
|
||||||
* fdw_private list of the path to carry the convert_selectively option;
|
* fdw_private list of the path to carry the convert_selectively option;
|
||||||
* it will be propagated into the fdw_private list of the Plan node.
|
* it will be propagated into the fdw_private list of the Plan node.
|
||||||
*/
|
*/
|
||||||
@ -891,7 +891,7 @@ estimate_size(PlannerInfo *root, RelOptInfo *baserel,
|
|||||||
* planner's idea of the relation width; which is bogus if not all
|
* planner's idea of the relation width; which is bogus if not all
|
||||||
* columns are being read, not to mention that the text representation
|
* columns are being read, not to mention that the text representation
|
||||||
* of a row probably isn't the same size as its internal
|
* of a row probably isn't the same size as its internal
|
||||||
* representation. Possibly we could do something better, but the
|
* representation. Possibly we could do something better, but the
|
||||||
* real answer to anyone who complains is "ANALYZE" ...
|
* real answer to anyone who complains is "ANALYZE" ...
|
||||||
*/
|
*/
|
||||||
int tuple_width;
|
int tuple_width;
|
||||||
@ -956,7 +956,7 @@ estimate_costs(PlannerInfo *root, RelOptInfo *baserel,
|
|||||||
* which must have at least targrows entries.
|
* which must have at least targrows entries.
|
||||||
* The actual number of rows selected is returned as the function result.
|
* The actual number of rows selected is returned as the function result.
|
||||||
* We also count the total number of rows in the file and return it into
|
* We also count the total number of rows in the file and return it into
|
||||||
* *totalrows. Note that *totaldeadrows is always set to 0.
|
* *totalrows. Note that *totaldeadrows is always set to 0.
|
||||||
*
|
*
|
||||||
* Note that the returned list of rows is not always in order by physical
|
* Note that the returned list of rows is not always in order by physical
|
||||||
* position in the file. Therefore, correlation estimates derived later
|
* position in the file. Therefore, correlation estimates derived later
|
||||||
|
@ -50,7 +50,7 @@ static int levenshtein_internal(text *s, text *t,
|
|||||||
* array.
|
* array.
|
||||||
*
|
*
|
||||||
* If max_d >= 0, we only need to provide an accurate answer when that answer
|
* If max_d >= 0, we only need to provide an accurate answer when that answer
|
||||||
* is less than or equal to the bound. From any cell in the matrix, there is
|
* is less than or equal to the bound. From any cell in the matrix, there is
|
||||||
* theoretical "minimum residual distance" from that cell to the last column
|
* theoretical "minimum residual distance" from that cell to the last column
|
||||||
* of the final row. This minimum residual distance is zero when the
|
* of the final row. This minimum residual distance is zero when the
|
||||||
* untransformed portions of the strings are of equal length (because we might
|
* untransformed portions of the strings are of equal length (because we might
|
||||||
@ -141,7 +141,7 @@ levenshtein_internal(text *s, text *t,
|
|||||||
stop_column = m + 1;
|
stop_column = m + 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If max_d >= 0, determine whether the bound is impossibly tight. If so,
|
* If max_d >= 0, determine whether the bound is impossibly tight. If so,
|
||||||
* return max_d + 1 immediately. Otherwise, determine whether it's tight
|
* return max_d + 1 immediately. Otherwise, determine whether it's tight
|
||||||
* enough to limit the computation we must perform. If so, figure out
|
* enough to limit the computation we must perform. If so, figure out
|
||||||
* initial stop column.
|
* initial stop column.
|
||||||
@ -168,7 +168,7 @@ levenshtein_internal(text *s, text *t,
|
|||||||
* need to fill in. If the string is growing, the theoretical
|
* need to fill in. If the string is growing, the theoretical
|
||||||
* minimum distance already incorporates the cost of deleting the
|
* minimum distance already incorporates the cost of deleting the
|
||||||
* number of characters necessary to make the two strings equal in
|
* number of characters necessary to make the two strings equal in
|
||||||
* length. Each additional deletion forces another insertion, so
|
* length. Each additional deletion forces another insertion, so
|
||||||
* the best-case total cost increases by ins_c + del_c. If the
|
* the best-case total cost increases by ins_c + del_c. If the
|
||||||
* string is shrinking, the minimum theoretical cost assumes no
|
* string is shrinking, the minimum theoretical cost assumes no
|
||||||
* excess deletions; that is, we're starting no further right than
|
* excess deletions; that is, we're starting no further right than
|
||||||
@ -246,7 +246,7 @@ levenshtein_internal(text *s, text *t,
|
|||||||
/*
|
/*
|
||||||
* The main loop fills in curr, but curr[0] needs a special case: to
|
* The main loop fills in curr, but curr[0] needs a special case: to
|
||||||
* transform the first 0 characters of s into the first j characters
|
* transform the first 0 characters of s into the first j characters
|
||||||
* of t, we must perform j insertions. However, if start_column > 0,
|
* of t, we must perform j insertions. However, if start_column > 0,
|
||||||
* this special case does not apply.
|
* this special case does not apply.
|
||||||
*/
|
*/
|
||||||
if (start_column == 0)
|
if (start_column == 0)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* HEntry: there is one of these for each key _and_ value in an hstore
|
* HEntry: there is one of these for each key _and_ value in an hstore
|
||||||
*
|
*
|
||||||
* the position offset points to the _end_ so that we can get the length
|
* the position offset points to the _end_ so that we can get the length
|
||||||
* by subtraction from the previous entry. the ISFIRST flag lets us tell
|
* by subtraction from the previous entry. the ISFIRST flag lets us tell
|
||||||
* whether there is a previous entry.
|
* whether there is a previous entry.
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
/*
|
/*
|
||||||
* When using a GIN index for hstore, we choose to index both keys and values.
|
* When using a GIN index for hstore, we choose to index both keys and values.
|
||||||
* The storage format is "text" values, with K, V, or N prepended to the string
|
* The storage format is "text" values, with K, V, or N prepended to the string
|
||||||
* to indicate key, value, or null values. (As of 9.1 it might be better to
|
* to indicate key, value, or null values. (As of 9.1 it might be better to
|
||||||
* store null values as nulls, but we'll keep it this way for on-disk
|
* store null values as nulls, but we'll keep it this way for on-disk
|
||||||
* compatibility.)
|
* compatibility.)
|
||||||
*/
|
*/
|
||||||
@ -168,7 +168,7 @@ gin_consistent_hstore(PG_FUNCTION_ARGS)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Index doesn't have information about correspondence of keys and
|
* Index doesn't have information about correspondence of keys and
|
||||||
* values, so we need recheck. However, if not all the keys are
|
* values, so we need recheck. However, if not all the keys are
|
||||||
* present, we can fail at once.
|
* present, we can fail at once.
|
||||||
*/
|
*/
|
||||||
*recheck = true;
|
*recheck = true;
|
||||||
|
@ -353,7 +353,7 @@ gin_bool_consistent(QUERYTYPE *query, bool *check)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up data for checkcondition_gin. This must agree with the query
|
* Set up data for checkcondition_gin. This must agree with the query
|
||||||
* extraction code in ginint4_queryextract.
|
* extraction code in ginint4_queryextract.
|
||||||
*/
|
*/
|
||||||
gcv.first = items;
|
gcv.first = items;
|
||||||
|
@ -480,7 +480,7 @@ g_int_picksplit(PG_FUNCTION_ARGS)
|
|||||||
qsort((void *) costvector, maxoff, sizeof(SPLITCOST), comparecost);
|
qsort((void *) costvector, maxoff, sizeof(SPLITCOST), comparecost);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now split up the regions between the two seeds. An important property
|
* Now split up the regions between the two seeds. An important property
|
||||||
* of this split algorithm is that the split vector v has the indices of
|
* of this split algorithm is that the split vector v has the indices of
|
||||||
* items to be split in order in its left and right vectors. We exploit
|
* items to be split in order in its left and right vectors. We exploit
|
||||||
* this property by doing a merge in the code that actually splits the
|
* this property by doing a merge in the code that actually splits the
|
||||||
@ -498,7 +498,7 @@ g_int_picksplit(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If we've already decided where to place this item, just put it on
|
* If we've already decided where to place this item, just put it on
|
||||||
* the right list. Otherwise, we need to figure out which page needs
|
* the right list. Otherwise, we need to figure out which page needs
|
||||||
* the least enlargement in order to store the item.
|
* the least enlargement in order to store the item.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ rt__int_size(ArrayType *a, float *size)
|
|||||||
*size = (float) ARRNELEMS(a);
|
*size = (float) ARRNELEMS(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sort the given data (len >= 2). Return true if any duplicates found */
|
/* Sort the given data (len >= 2). Return true if any duplicates found */
|
||||||
bool
|
bool
|
||||||
isort(int32 *a, int len)
|
isort(int32 *a, int len)
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ isort(int32 *a, int len)
|
|||||||
bool r = FALSE;
|
bool r = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We use a simple insertion sort. While this is O(N^2) in the worst
|
* We use a simple insertion sort. While this is O(N^2) in the worst
|
||||||
* case, it's quite fast if the input is already sorted or nearly so.
|
* case, it's quite fast if the input is already sorted or nearly so.
|
||||||
* Also, for not-too-large inputs it's faster than more complex methods
|
* Also, for not-too-large inputs it's faster than more complex methods
|
||||||
* anyhow.
|
* anyhow.
|
||||||
|
@ -612,7 +612,7 @@ ltreeparentsel(PG_FUNCTION_ARGS)
|
|||||||
/*
|
/*
|
||||||
* If the histogram is large enough, see what fraction of it the
|
* If the histogram is large enough, see what fraction of it the
|
||||||
* constant is "<@" to, and assume that's representative of the
|
* constant is "<@" to, and assume that's representative of the
|
||||||
* non-MCV population. Otherwise use the default selectivity for the
|
* non-MCV population. Otherwise use the default selectivity for the
|
||||||
* non-MCV population.
|
* non-MCV population.
|
||||||
*/
|
*/
|
||||||
selec = histogram_selectivity(&vardata, &contproc,
|
selec = histogram_selectivity(&vardata, &contproc,
|
||||||
|
@ -413,7 +413,7 @@ sql_exec(PGconn *conn, const char *todo, bool quiet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dump all databases. There are no system objects to worry about.
|
* Dump all databases. There are no system objects to worry about.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
sql_exec_dumpalldbs(PGconn *conn, struct options * opts)
|
sql_exec_dumpalldbs(PGconn *conn, struct options * opts)
|
||||||
|
@ -124,7 +124,7 @@ CleanupPriorWALFiles(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* We ignore the timeline part of the XLOG segment identifiers in
|
* We ignore the timeline part of the XLOG segment identifiers in
|
||||||
* deciding whether a segment is still needed. This ensures that
|
* deciding whether a segment is still needed. This ensures that
|
||||||
* we won't prematurely remove a segment from a parent timeline.
|
* we won't prematurely remove a segment from a parent timeline.
|
||||||
* We could probably be a little more proactive about removing
|
* We could probably be a little more proactive about removing
|
||||||
* segments of non-parent timelines, but that would be a whole lot
|
* segments of non-parent timelines, but that would be a whole lot
|
||||||
@ -151,7 +151,7 @@ CleanupPriorWALFiles(void)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Prints the name of the file to be removed and skips the
|
* Prints the name of the file to be removed and skips the
|
||||||
* actual removal. The regular printout is so that the
|
* actual removal. The regular printout is so that the
|
||||||
* user can pipe the output into some other program.
|
* user can pipe the output into some other program.
|
||||||
*/
|
*/
|
||||||
printf("%s\n", WALFilePath);
|
printf("%s\n", WALFilePath);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Track statement execution times across a whole database cluster.
|
* Track statement execution times across a whole database cluster.
|
||||||
*
|
*
|
||||||
* Execution costs are totalled for each distinct source query, and kept in
|
* Execution costs are totalled for each distinct source query, and kept in
|
||||||
* a shared hashtable. (We track only as many distinct queries as will fit
|
* a shared hashtable. (We track only as many distinct queries as will fit
|
||||||
* in the designated amount of shared memory.)
|
* in the designated amount of shared memory.)
|
||||||
*
|
*
|
||||||
* As of Postgres 9.2, this module normalizes query entries. Normalization
|
* As of Postgres 9.2, this module normalizes query entries. Normalization
|
||||||
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
* Normalization is implemented by fingerprinting queries, selectively
|
* Normalization is implemented by fingerprinting queries, selectively
|
||||||
* serializing those fields of each query tree's nodes that are judged to be
|
* serializing those fields of each query tree's nodes that are judged to be
|
||||||
* essential to the query. This is referred to as a query jumble. This is
|
* essential to the query. This is referred to as a query jumble. This is
|
||||||
* distinct from a regular serialization in that various extraneous
|
* distinct from a regular serialization in that various extraneous
|
||||||
* information is ignored as irrelevant or not essential to the query, such
|
* information is ignored as irrelevant or not essential to the query, such
|
||||||
* as the collations of Vars and, most notably, the values of constants.
|
* as the collations of Vars and, most notably, the values of constants.
|
||||||
@ -1232,7 +1232,7 @@ pgss_memsize(void)
|
|||||||
* would be difficult to demonstrate this even under artificial conditions.)
|
* would be difficult to demonstrate this even under artificial conditions.)
|
||||||
*
|
*
|
||||||
* Note: despite needing exclusive lock, it's not an error for the target
|
* Note: despite needing exclusive lock, it's not an error for the target
|
||||||
* entry to already exist. This is because pgss_store releases and
|
* entry to already exist. This is because pgss_store releases and
|
||||||
* reacquires lock after failing to find a match; so someone else could
|
* reacquires lock after failing to find a match; so someone else could
|
||||||
* have made the entry while we waited to get exclusive lock.
|
* have made the entry while we waited to get exclusive lock.
|
||||||
*/
|
*/
|
||||||
@ -1491,7 +1491,7 @@ JumbleRangeTable(pgssJumbleState *jstate, List *rtable)
|
|||||||
*
|
*
|
||||||
* Note: the reason we don't simply use expression_tree_walker() is that the
|
* Note: the reason we don't simply use expression_tree_walker() is that the
|
||||||
* point of that function is to support tree walkers that don't care about
|
* point of that function is to support tree walkers that don't care about
|
||||||
* most tree node types, but here we care about all types. We should complain
|
* most tree node types, but here we care about all types. We should complain
|
||||||
* about any unrecognized node type.
|
* about any unrecognized node type.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -2013,7 +2013,7 @@ generate_normalized_query(pgssJumbleState *jstate, const char *query,
|
|||||||
* a problem.
|
* a problem.
|
||||||
*
|
*
|
||||||
* Duplicate constant pointers are possible, and will have their lengths
|
* Duplicate constant pointers are possible, and will have their lengths
|
||||||
* marked as '-1', so that they are later ignored. (Actually, we assume the
|
* marked as '-1', so that they are later ignored. (Actually, we assume the
|
||||||
* lengths were initialized as -1 to start with, and don't change them here.)
|
* lengths were initialized as -1 to start with, and don't change them here.)
|
||||||
*
|
*
|
||||||
* N.B. There is an assumption that a '-' character at a Const location begins
|
* N.B. There is an assumption that a '-' character at a Const location begins
|
||||||
@ -2082,7 +2082,7 @@ fill_in_constant_lengths(pgssJumbleState *jstate, const char *query)
|
|||||||
* adjustment of location to that of the leading '-'
|
* adjustment of location to that of the leading '-'
|
||||||
* operator in the event of a negative constant. It is
|
* operator in the event of a negative constant. It is
|
||||||
* also useful for our purposes to start from the minus
|
* also useful for our purposes to start from the minus
|
||||||
* symbol. In this way, queries like "select * from foo
|
* symbol. In this way, queries like "select * from foo
|
||||||
* where bar = 1" and "select * from foo where bar = -2"
|
* where bar = 1" and "select * from foo where bar = -2"
|
||||||
* will have identical normalized query strings.
|
* will have identical normalized query strings.
|
||||||
*/
|
*/
|
||||||
|
@ -121,7 +121,7 @@ gin_extract_query_trgm(PG_FUNCTION_ARGS)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Successful regex processing: store NFA-like graph as
|
* Successful regex processing: store NFA-like graph as
|
||||||
* extra_data. GIN API requires an array of nentries
|
* extra_data. GIN API requires an array of nentries
|
||||||
* Pointers, but we just put the same value in each element.
|
* Pointers, but we just put the same value in each element.
|
||||||
*/
|
*/
|
||||||
trglen = ARRNELEM(trg);
|
trglen = ARRNELEM(trg);
|
||||||
|
@ -405,7 +405,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* GETBIT() tests may give false positives, due to limited
|
* GETBIT() tests may give false positives, due to limited
|
||||||
* size of the sign array. But since trigramsMatchGraph()
|
* size of the sign array. But since trigramsMatchGraph()
|
||||||
* implements a monotone boolean function, false positives
|
* implements a monotone boolean function, false positives
|
||||||
* in the check array can't lead to false negative answer.
|
* in the check array can't lead to false negative answer.
|
||||||
* So we can apply trigramsMatchGraph despite uncertainty,
|
* So we can apply trigramsMatchGraph despite uncertainty,
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
* In the 2nd stage, the automaton is transformed into a graph based on the
|
* In the 2nd stage, the automaton is transformed into a graph based on the
|
||||||
* original NFA. Each state in the expanded graph represents a state from
|
* original NFA. Each state in the expanded graph represents a state from
|
||||||
* the original NFA, plus a prefix identifying the last two characters
|
* the original NFA, plus a prefix identifying the last two characters
|
||||||
* (colors, to be precise) seen before entering the state. There can be
|
* (colors, to be precise) seen before entering the state. There can be
|
||||||
* multiple states in the expanded graph for each state in the original NFA,
|
* multiple states in the expanded graph for each state in the original NFA,
|
||||||
* depending on what characters can precede it. A prefix position can be
|
* depending on what characters can precede it. A prefix position can be
|
||||||
* "unknown" if it's uncertain what the preceding character was, or "blank"
|
* "unknown" if it's uncertain what the preceding character was, or "blank"
|
||||||
@ -74,7 +74,7 @@
|
|||||||
* "enter key".
|
* "enter key".
|
||||||
*
|
*
|
||||||
* Each arc of the expanded graph is labelled with a trigram that must be
|
* Each arc of the expanded graph is labelled with a trigram that must be
|
||||||
* present in the string to match. We can construct this from an out-arc of
|
* present in the string to match. We can construct this from an out-arc of
|
||||||
* the underlying NFA state by combining the expanded state's prefix with the
|
* the underlying NFA state by combining the expanded state's prefix with the
|
||||||
* color label of the underlying out-arc, if neither prefix position is
|
* color label of the underlying out-arc, if neither prefix position is
|
||||||
* "unknown". But note that some of the colors in the trigram might be
|
* "unknown". But note that some of the colors in the trigram might be
|
||||||
@ -106,7 +106,7 @@
|
|||||||
*
|
*
|
||||||
* When building the graph, if the number of states or arcs exceed pre-defined
|
* When building the graph, if the number of states or arcs exceed pre-defined
|
||||||
* limits, we give up and simply mark any states not yet processed as final
|
* limits, we give up and simply mark any states not yet processed as final
|
||||||
* states. Roughly speaking, that means that we make use of some portion from
|
* states. Roughly speaking, that means that we make use of some portion from
|
||||||
* the beginning of the regexp. Also, any colors that have too many member
|
* the beginning of the regexp. Also, any colors that have too many member
|
||||||
* characters are treated as "unknown", so that we can't derive trigrams
|
* characters are treated as "unknown", so that we can't derive trigrams
|
||||||
* from them.
|
* from them.
|
||||||
@ -159,10 +159,10 @@
|
|||||||
* 1) Create state 1 with enter key (UNKNOWN, UNKNOWN, 1).
|
* 1) Create state 1 with enter key (UNKNOWN, UNKNOWN, 1).
|
||||||
* 2) Add key (UNKNOWN, "a", 2) to state 1.
|
* 2) Add key (UNKNOWN, "a", 2) to state 1.
|
||||||
* 3) Add key ("a", "b", 3) to state 1.
|
* 3) Add key ("a", "b", 3) to state 1.
|
||||||
* 4) Create new state 2 with enter key ("b", "c", 4). Add an arc
|
* 4) Create new state 2 with enter key ("b", "c", 4). Add an arc
|
||||||
* from state 1 to state 2 with label trigram "abc".
|
* from state 1 to state 2 with label trigram "abc".
|
||||||
* 5) Mark state 2 final because state 4 of source NFA is marked as final.
|
* 5) Mark state 2 final because state 4 of source NFA is marked as final.
|
||||||
* 6) Create new state 3 with enter key ("b", "d", 5). Add an arc
|
* 6) Create new state 3 with enter key ("b", "d", 5). Add an arc
|
||||||
* from state 1 to state 3 with label trigram "abd".
|
* from state 1 to state 3 with label trigram "abd".
|
||||||
* 7) Mark state 3 final because state 5 of source NFA is marked as final.
|
* 7) Mark state 3 final because state 5 of source NFA is marked as final.
|
||||||
*
|
*
|
||||||
@ -242,10 +242,10 @@ typedef struct
|
|||||||
*
|
*
|
||||||
* We call a prefix ambiguous if at least one of its colors is unknown. It's
|
* We call a prefix ambiguous if at least one of its colors is unknown. It's
|
||||||
* fully ambiguous if both are unknown, partially ambiguous if only the first
|
* fully ambiguous if both are unknown, partially ambiguous if only the first
|
||||||
* is unknown. (The case of first color known, second unknown is not valid.)
|
* is unknown. (The case of first color known, second unknown is not valid.)
|
||||||
*
|
*
|
||||||
* Wholly- or partly-blank prefixes are mostly handled the same as regular
|
* Wholly- or partly-blank prefixes are mostly handled the same as regular
|
||||||
* color prefixes. This allows us to generate appropriate partly-blank
|
* color prefixes. This allows us to generate appropriate partly-blank
|
||||||
* trigrams when the NFA requires word character(s) to appear adjacent to
|
* trigrams when the NFA requires word character(s) to appear adjacent to
|
||||||
* non-word character(s).
|
* non-word character(s).
|
||||||
*/
|
*/
|
||||||
@ -271,7 +271,7 @@ typedef struct
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Key identifying a state of our expanded graph: color prefix, and number
|
* Key identifying a state of our expanded graph: color prefix, and number
|
||||||
* of the corresponding state in the underlying regex NFA. The color prefix
|
* of the corresponding state in the underlying regex NFA. The color prefix
|
||||||
* shows how we reached the regex state (to the extent that we know it).
|
* shows how we reached the regex state (to the extent that we know it).
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -405,7 +405,7 @@ struct TrgmPackedGraph
|
|||||||
* colorTrigramsCount and colorTrigramsGroups contain information about
|
* colorTrigramsCount and colorTrigramsGroups contain information about
|
||||||
* how trigrams are grouped into color trigrams. "colorTrigramsCount" is
|
* how trigrams are grouped into color trigrams. "colorTrigramsCount" is
|
||||||
* the count of color trigrams and "colorTrigramGroups" contains number of
|
* the count of color trigrams and "colorTrigramGroups" contains number of
|
||||||
* simple trigrams for each color trigram. The array of simple trigrams
|
* simple trigrams for each color trigram. The array of simple trigrams
|
||||||
* (stored separately from this struct) is ordered so that the simple
|
* (stored separately from this struct) is ordered so that the simple
|
||||||
* trigrams for each color trigram are consecutive, and they're in order
|
* trigrams for each color trigram are consecutive, and they're in order
|
||||||
* by color trigram number.
|
* by color trigram number.
|
||||||
@ -492,7 +492,7 @@ createTrgmNFA(text *text_re, Oid collation,
|
|||||||
/*
|
/*
|
||||||
* This processing generates a great deal of cruft, which we'd like to
|
* This processing generates a great deal of cruft, which we'd like to
|
||||||
* clean up before returning (since this function may be called in a
|
* clean up before returning (since this function may be called in a
|
||||||
* query-lifespan memory context). Make a temp context we can work in so
|
* query-lifespan memory context). Make a temp context we can work in so
|
||||||
* that cleanup is easy.
|
* that cleanup is easy.
|
||||||
*/
|
*/
|
||||||
tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
|
tmpcontext = AllocSetContextCreate(CurrentMemoryContext,
|
||||||
@ -808,7 +808,7 @@ convertPgWchar(pg_wchar c, trgm_mb_char *result)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* We can ignore the NUL character, since it can never appear in a PG text
|
* We can ignore the NUL character, since it can never appear in a PG text
|
||||||
* string. This avoids the need for various special cases when
|
* string. This avoids the need for various special cases when
|
||||||
* reconstructing trigrams.
|
* reconstructing trigrams.
|
||||||
*/
|
*/
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
@ -819,7 +819,7 @@ convertPgWchar(pg_wchar c, trgm_mb_char *result)
|
|||||||
pg_wchar2mb_with_len(&c, s, 1);
|
pg_wchar2mb_with_len(&c, s, 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In IGNORECASE mode, we can ignore uppercase characters. We assume that
|
* In IGNORECASE mode, we can ignore uppercase characters. We assume that
|
||||||
* the regex engine generated both uppercase and lowercase equivalents
|
* the regex engine generated both uppercase and lowercase equivalents
|
||||||
* within each color, since we used the REG_ICASE option; so there's no
|
* within each color, since we used the REG_ICASE option; so there's no
|
||||||
* need to process the uppercase version.
|
* need to process the uppercase version.
|
||||||
@ -901,7 +901,7 @@ transformGraph(TrgmNFA *trgmNFA)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Recursively build the expanded graph by processing queue of states
|
* Recursively build the expanded graph by processing queue of states
|
||||||
* (breadth-first search). getState already put initstate in the queue.
|
* (breadth-first search). getState already put initstate in the queue.
|
||||||
*/
|
*/
|
||||||
while (trgmNFA->queue != NIL)
|
while (trgmNFA->queue != NIL)
|
||||||
{
|
{
|
||||||
@ -910,7 +910,7 @@ transformGraph(TrgmNFA *trgmNFA)
|
|||||||
trgmNFA->queue = list_delete_first(trgmNFA->queue);
|
trgmNFA->queue = list_delete_first(trgmNFA->queue);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we overflowed then just mark state as final. Otherwise do
|
* If we overflowed then just mark state as final. Otherwise do
|
||||||
* actual processing.
|
* actual processing.
|
||||||
*/
|
*/
|
||||||
if (trgmNFA->overflowed)
|
if (trgmNFA->overflowed)
|
||||||
@ -936,7 +936,7 @@ processState(TrgmNFA *trgmNFA, TrgmState *state)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Add state's own key, and then process all keys added to keysQueue until
|
* Add state's own key, and then process all keys added to keysQueue until
|
||||||
* queue is empty. But we can quit if the state gets marked final.
|
* queue is empty. But we can quit if the state gets marked final.
|
||||||
*/
|
*/
|
||||||
addKey(trgmNFA, state, &state->stateKey);
|
addKey(trgmNFA, state, &state->stateKey);
|
||||||
while (trgmNFA->keysQueue != NIL && !state->fin)
|
while (trgmNFA->keysQueue != NIL && !state->fin)
|
||||||
@ -990,7 +990,7 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Compare key to each existing enter key of the state to check for
|
* Compare key to each existing enter key of the state to check for
|
||||||
* redundancy. We can drop either old key(s) or the new key if we find
|
* redundancy. We can drop either old key(s) or the new key if we find
|
||||||
* redundancy.
|
* redundancy.
|
||||||
*/
|
*/
|
||||||
prev = NULL;
|
prev = NULL;
|
||||||
@ -1064,7 +1064,7 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
|
|||||||
else if (pg_reg_colorisend(trgmNFA->regex, arc->co))
|
else if (pg_reg_colorisend(trgmNFA->regex, arc->co))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* End of line/string ($). We must consider this arc as a
|
* End of line/string ($). We must consider this arc as a
|
||||||
* transition that doesn't read anything. The reason for adding
|
* transition that doesn't read anything. The reason for adding
|
||||||
* this enter key to the state is that if the arc leads to the
|
* this enter key to the state is that if the arc leads to the
|
||||||
* NFA's final state, we must mark this expanded state as final.
|
* NFA's final state, we must mark this expanded state as final.
|
||||||
@ -1109,7 +1109,7 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
|
|||||||
* We can reach the arc destination after reading a word
|
* We can reach the arc destination after reading a word
|
||||||
* character, but the prefix is not something that addArc
|
* character, but the prefix is not something that addArc
|
||||||
* will accept, so no trigram arc can get made for this
|
* will accept, so no trigram arc can get made for this
|
||||||
* transition. We must make an enter key to show that the
|
* transition. We must make an enter key to show that the
|
||||||
* arc destination is reachable. The prefix for the enter
|
* arc destination is reachable. The prefix for the enter
|
||||||
* key should reflect the info we have for this arc.
|
* key should reflect the info we have for this arc.
|
||||||
*/
|
*/
|
||||||
@ -1122,9 +1122,9 @@ addKey(TrgmNFA *trgmNFA, TrgmState *state, TrgmStateKey *key)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Unexpandable color. Add enter key with ambiguous prefix,
|
* Unexpandable color. Add enter key with ambiguous prefix,
|
||||||
* showing we can reach the destination from this state, but
|
* showing we can reach the destination from this state, but
|
||||||
* the preceding colors will be uncertain. (We do not set the
|
* the preceding colors will be uncertain. (We do not set the
|
||||||
* first prefix color to key->prefix.colors[1], because a
|
* first prefix color to key->prefix.colors[1], because a
|
||||||
* prefix of known followed by unknown is invalid.)
|
* prefix of known followed by unknown is invalid.)
|
||||||
*/
|
*/
|
||||||
@ -1313,9 +1313,9 @@ validArcLabel(TrgmStateKey *key, TrgmColor co)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We also reject nonblank-blank-anything. The nonblank-blank-nonblank
|
* We also reject nonblank-blank-anything. The nonblank-blank-nonblank
|
||||||
* case doesn't correspond to any trigram the trigram extraction code
|
* case doesn't correspond to any trigram the trigram extraction code
|
||||||
* would make. The nonblank-blank-blank case is also not possible with
|
* would make. The nonblank-blank-blank case is also not possible with
|
||||||
* RPADDING = 1. (Note that in many cases we'd fail to generate such a
|
* RPADDING = 1. (Note that in many cases we'd fail to generate such a
|
||||||
* trigram even if it were valid, for example processing "foo bar" will
|
* trigram even if it were valid, for example processing "foo bar" will
|
||||||
* not result in considering the trigram "o ". So if you want to support
|
* not result in considering the trigram "o ". So if you want to support
|
||||||
@ -1515,7 +1515,7 @@ selectColorTrigrams(TrgmNFA *trgmNFA)
|
|||||||
* Remove color trigrams from the graph so long as total number of simple
|
* Remove color trigrams from the graph so long as total number of simple
|
||||||
* trigrams exceeds MAX_TRGM_COUNT. We prefer to remove color trigrams
|
* trigrams exceeds MAX_TRGM_COUNT. We prefer to remove color trigrams
|
||||||
* with the most associated simple trigrams, since those are the most
|
* with the most associated simple trigrams, since those are the most
|
||||||
* promising for reducing the total number of simple trigrams. When
|
* promising for reducing the total number of simple trigrams. When
|
||||||
* removing a color trigram we have to merge states connected by arcs
|
* removing a color trigram we have to merge states connected by arcs
|
||||||
* labeled with that trigram. It's necessary to not merge initial and
|
* labeled with that trigram. It's necessary to not merge initial and
|
||||||
* final states, because our graph becomes useless if that happens; so we
|
* final states, because our graph becomes useless if that happens; so we
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* pg_control data. pg_resetxlog cannot be run while the server is running
|
* pg_control data. pg_resetxlog cannot be run while the server is running
|
||||||
* so we use pg_controldata; pg_controldata doesn't provide all the fields
|
* so we use pg_controldata; pg_controldata doesn't provide all the fields
|
||||||
* we need to actually perform the upgrade, but it provides enough for
|
* we need to actually perform the upgrade, but it provides enough for
|
||||||
* check mode. We do not implement pg_resetxlog -n because it is hard to
|
* check mode. We do not implement pg_resetxlog -n because it is hard to
|
||||||
* return valid xid data for a running server.
|
* return valid xid data for a running server.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
@ -34,7 +34,7 @@ generate_old_dump(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Set umask for this function, all functions it calls, and all
|
* Set umask for this function, all functions it calls, and all
|
||||||
* subprocesses/threads it creates. We can't use fopen_priv()
|
* subprocesses/threads it creates. We can't use fopen_priv()
|
||||||
* as Windows uses threads and umask is process-global.
|
* as Windows uses threads and umask is process-global.
|
||||||
*/
|
*/
|
||||||
old_umask = umask(S_IRWXG | S_IRWXO);
|
old_umask = umask(S_IRWXG | S_IRWXO);
|
||||||
|
@ -159,7 +159,7 @@ static DWORD mainThreadId = 0;
|
|||||||
* We can't do this on Windows because it will keep the "pg_ctl start"
|
* We can't do this on Windows because it will keep the "pg_ctl start"
|
||||||
* output filename open until the server stops, so we do the \n\n above on
|
* output filename open until the server stops, so we do the \n\n above on
|
||||||
* that platform. We use a unique filename for "pg_ctl start" that is
|
* that platform. We use a unique filename for "pg_ctl start" that is
|
||||||
* never reused while the server is running, so it works fine. We could
|
* never reused while the server is running, so it works fine. We could
|
||||||
* log these commands to a third file, but that just adds complexity.
|
* log these commands to a third file, but that just adds complexity.
|
||||||
*/
|
*/
|
||||||
if ((log = fopen(log_file, "a")) == NULL)
|
if ((log = fopen(log_file, "a")) == NULL)
|
||||||
@ -240,7 +240,7 @@ win32_check_directory_write_permissions(void)
|
|||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We open a file we would normally create anyway. We do this even in
|
* We open a file we would normally create anyway. We do this even in
|
||||||
* 'check' mode, which isn't ideal, but this is the best we can do.
|
* 'check' mode, which isn't ideal, but this is the best we can do.
|
||||||
*/
|
*/
|
||||||
if ((fd = open(GLOBALS_DUMP_FILE, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) < 0)
|
if ((fd = open(GLOBALS_DUMP_FILE, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) < 0)
|
||||||
@ -257,7 +257,7 @@ win32_check_directory_write_permissions(void)
|
|||||||
*
|
*
|
||||||
* This function validates the given cluster directory - we search for a
|
* This function validates the given cluster directory - we search for a
|
||||||
* small set of subdirectories that we expect to find in a valid $PGDATA
|
* small set of subdirectories that we expect to find in a valid $PGDATA
|
||||||
* directory. If any of the subdirectories are missing (or secured against
|
* directory. If any of the subdirectories are missing (or secured against
|
||||||
* us) we display an error message and exit()
|
* us) we display an error message and exit()
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -297,7 +297,7 @@ check_data_dir(const char *pg_data)
|
|||||||
* check_bin_dir()
|
* check_bin_dir()
|
||||||
*
|
*
|
||||||
* This function searches for the executables that we expect to find
|
* This function searches for the executables that we expect to find
|
||||||
* in the binaries directory. If we find that a required executable
|
* in the binaries directory. If we find that a required executable
|
||||||
* is missing (or secured against us), we display an error message and
|
* is missing (or secured against us), we display an error message and
|
||||||
* exit().
|
* exit().
|
||||||
*/
|
*/
|
||||||
|
@ -297,7 +297,7 @@ check_loadable_libraries(void)
|
|||||||
* plpython2u language was created with library name plpython2.so as a
|
* plpython2u language was created with library name plpython2.so as a
|
||||||
* symbolic link to plpython.so. In Postgres 9.1, only the
|
* symbolic link to plpython.so. In Postgres 9.1, only the
|
||||||
* plpython2.so library was created, and both plpythonu and plpython2u
|
* plpython2.so library was created, and both plpythonu and plpython2u
|
||||||
* pointing to it. For this reason, any reference to library name
|
* pointing to it. For this reason, any reference to library name
|
||||||
* "plpython" in an old PG <= 9.1 cluster must look for "plpython2" in
|
* "plpython" in an old PG <= 9.1 cluster must look for "plpython2" in
|
||||||
* the new cluster.
|
* the new cluster.
|
||||||
*
|
*
|
||||||
|
@ -363,7 +363,7 @@ adjust_data_dir(ClusterInfo *cluster)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* We don't have a data directory yet, so we can't check the PG version,
|
* We don't have a data directory yet, so we can't check the PG version,
|
||||||
* so this might fail --- only works for PG 9.2+. If this fails,
|
* so this might fail --- only works for PG 9.2+. If this fails,
|
||||||
* pg_upgrade will fail anyway because the data files will not be found.
|
* pg_upgrade will fail anyway because the data files will not be found.
|
||||||
*/
|
*/
|
||||||
snprintf(cmd, sizeof(cmd), "\"%s/postmaster\" -D \"%s\" -C data_directory",
|
snprintf(cmd, sizeof(cmd), "\"%s/postmaster\" -D \"%s\" -C data_directory",
|
||||||
|
@ -30,7 +30,7 @@ static pageCnvCtx *loadConverterPlugin(
|
|||||||
* the PageLayoutVersion of the new cluster. If the versions differ, this
|
* the PageLayoutVersion of the new cluster. If the versions differ, this
|
||||||
* function loads a converter plugin and returns a pointer to a pageCnvCtx
|
* function loads a converter plugin and returns a pointer to a pageCnvCtx
|
||||||
* object (in *result) that knows how to convert pages from the old format
|
* object (in *result) that knows how to convert pages from the old format
|
||||||
* to the new format. If the versions are identical, this function just
|
* to the new format. If the versions are identical, this function just
|
||||||
* returns a NULL pageCnvCtx pointer to indicate that page-by-page conversion
|
* returns a NULL pageCnvCtx pointer to indicate that page-by-page conversion
|
||||||
* is not required.
|
* is not required.
|
||||||
*/
|
*/
|
||||||
@ -110,7 +110,7 @@ getPageVersion(uint16 *version, const char *pathName)
|
|||||||
* This function loads a page-converter plugin library and grabs a
|
* This function loads a page-converter plugin library and grabs a
|
||||||
* pointer to each of the (interesting) functions provided by that
|
* pointer to each of the (interesting) functions provided by that
|
||||||
* plugin. The name of the plugin library is derived from the given
|
* plugin. The name of the plugin library is derived from the given
|
||||||
* newPageVersion and oldPageVersion. If a plugin is found, this
|
* newPageVersion and oldPageVersion. If a plugin is found, this
|
||||||
* function returns a pointer to a pageCnvCtx object (which will contain
|
* function returns a pointer to a pageCnvCtx object (which will contain
|
||||||
* a collection of plugin function pointers). If the required plugin
|
* a collection of plugin function pointers). If the required plugin
|
||||||
* is not found, this function returns NULL.
|
* is not found, this function returns NULL.
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* FYI, while pg_class.oid and pg_class.relfilenode are initially the same
|
* FYI, while pg_class.oid and pg_class.relfilenode are initially the same
|
||||||
* in a cluster, but they can diverge due to CLUSTER, REINDEX, or VACUUM
|
* in a cluster, but they can diverge due to CLUSTER, REINDEX, or VACUUM
|
||||||
* FULL. The new cluster will have matching pg_class.oid and
|
* FULL. The new cluster will have matching pg_class.oid and
|
||||||
* pg_class.relfilenode values and be based on the old oid value. This can
|
* pg_class.relfilenode values and be based on the old oid value. This can
|
||||||
* cause the old and new pg_class.relfilenode values to differ. In summary,
|
* cause the old and new pg_class.relfilenode values to differ. In summary,
|
||||||
* old and new pg_class.oid and new pg_class.relfilenode will have the
|
* old and new pg_class.oid and new pg_class.relfilenode will have the
|
||||||
* same value, and old pg_class.relfilenode might differ.
|
* same value, and old pg_class.relfilenode might differ.
|
||||||
@ -126,7 +126,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Most failures happen in create_new_objects(), which has completed at
|
* Most failures happen in create_new_objects(), which has completed at
|
||||||
* this point. We do this here because it is just before linking, which
|
* this point. We do this here because it is just before linking, which
|
||||||
* will link the old and new cluster data files, preventing the old
|
* will link the old and new cluster data files, preventing the old
|
||||||
* cluster from being safely started once the new cluster is started.
|
* cluster from being safely started once the new cluster is started.
|
||||||
*/
|
*/
|
||||||
@ -194,7 +194,7 @@ setup(char *argv0, bool *live_check)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If we have a postmaster.pid file, try to start the server. If it
|
* If we have a postmaster.pid file, try to start the server. If it
|
||||||
* starts, the pid file was stale, so stop the server. If it doesn't
|
* starts, the pid file was stale, so stop the server. If it doesn't
|
||||||
* start, assume the server is running. If the pid file is left over
|
* start, assume the server is running. If the pid file is left over
|
||||||
* from a server crash, this also allows any committed transactions
|
* from a server crash, this also allows any committed transactions
|
||||||
* stored in the WAL to be replayed so they are not lost, because WAL
|
* stored in the WAL to be replayed so they are not lost, because WAL
|
||||||
@ -280,8 +280,8 @@ prepare_new_databases(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Install support functions in the global-object restore database to
|
* Install support functions in the global-object restore database to
|
||||||
* preserve pg_authid.oid. pg_dumpall uses 'template0' as its template
|
* preserve pg_authid.oid. pg_dumpall uses 'template0' as its template
|
||||||
* database so objects we add into 'template1' are not propogated. They
|
* database so objects we add into 'template1' are not propogated. They
|
||||||
* are removed on pg_upgrade exit.
|
* are removed on pg_upgrade exit.
|
||||||
*/
|
*/
|
||||||
install_support_functions_in_new_db("template1");
|
install_support_functions_in_new_db("template1");
|
||||||
|
@ -37,7 +37,7 @@ transfer_all_new_tablespaces(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
|
|||||||
/*
|
/*
|
||||||
* Transfering files by tablespace is tricky because a single database can
|
* Transfering files by tablespace is tricky because a single database can
|
||||||
* use multiple tablespaces. For non-parallel mode, we just pass a NULL
|
* use multiple tablespaces. For non-parallel mode, we just pass a NULL
|
||||||
* tablespace path, which matches all tablespaces. In parallel mode, we
|
* tablespace path, which matches all tablespaces. In parallel mode, we
|
||||||
* pass the default tablespace and all user-created tablespaces and let
|
* pass the default tablespace and all user-created tablespaces and let
|
||||||
* those operations happen in parallel.
|
* those operations happen in parallel.
|
||||||
*/
|
*/
|
||||||
@ -135,7 +135,7 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
|
|||||||
/*
|
/*
|
||||||
* get_pg_database_relfilenode()
|
* get_pg_database_relfilenode()
|
||||||
*
|
*
|
||||||
* Retrieves the relfilenode for a few system-catalog tables. We need these
|
* Retrieves the relfilenode for a few system-catalog tables. We need these
|
||||||
* relfilenodes later in the upgrade process.
|
* relfilenodes later in the upgrade process.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
@ -263,7 +263,7 @@ pg_putenv(const char *var, const char *val)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not free envstr because it becomes part of the environment on
|
* Do not free envstr because it becomes part of the environment on
|
||||||
* some operating systems. See port/unsetenv.c::unsetenv.
|
* some operating systems. See port/unsetenv.c::unsetenv.
|
||||||
*/
|
*/
|
||||||
#else
|
#else
|
||||||
SetEnvironmentVariableA(var, val);
|
SetEnvironmentVariableA(var, val);
|
||||||
|
@ -41,7 +41,7 @@ timestamptz_to_time_t(TimestampTz t)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Stopgap implementation of timestamptz_to_str that doesn't depend on backend
|
* Stopgap implementation of timestamptz_to_str that doesn't depend on backend
|
||||||
* infrastructure. This will work for timestamps that are within the range
|
* infrastructure. This will work for timestamps that are within the range
|
||||||
* of the platform time_t type. (pg_time_t is compatible except for possibly
|
* of the platform time_t type. (pg_time_t is compatible except for possibly
|
||||||
* being wider.)
|
* being wider.)
|
||||||
*
|
*
|
||||||
|
@ -404,7 +404,7 @@ strtoint64(const char *str)
|
|||||||
ptr++;
|
ptr++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do an explicit check for INT64_MIN. Ugly though this is, it's
|
* Do an explicit check for INT64_MIN. Ugly though this is, it's
|
||||||
* cleaner than trying to get the loop below to handle it portably.
|
* cleaner than trying to get the loop below to handle it portably.
|
||||||
*/
|
*/
|
||||||
if (strncmp(ptr, "9223372036854775808", 19) == 0)
|
if (strncmp(ptr, "9223372036854775808", 19) == 0)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* entirely in crypt_blowfish.c.
|
* entirely in crypt_blowfish.c.
|
||||||
*
|
*
|
||||||
* Put bcrypt generator also here as crypt-blowfish.c
|
* Put bcrypt generator also here as crypt-blowfish.c
|
||||||
* may not be compiled always. -- marko
|
* may not be compiled always. -- marko
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* There is some confusion about whether and how to carry forward
|
* There is some confusion about whether and how to carry forward
|
||||||
* the state of the pools. Seems like original Fortuna does not
|
* the state of the pools. Seems like original Fortuna does not
|
||||||
* do it, resetting hash after each request. I guess expecting
|
* do it, resetting hash after each request. I guess expecting
|
||||||
* feeding to happen more often that requesting. This is absolutely
|
* feeding to happen more often that requesting. This is absolutely
|
||||||
* unsuitable for pgcrypto, as nothing asynchronous happens here.
|
* unsuitable for pgcrypto, as nothing asynchronous happens here.
|
||||||
@ -77,7 +77,7 @@
|
|||||||
* How many pools.
|
* How many pools.
|
||||||
*
|
*
|
||||||
* Original Fortuna uses 32 pools, that means 32'th pool is
|
* Original Fortuna uses 32 pools, that means 32'th pool is
|
||||||
* used not earlier than in 13th year. This is a waste in
|
* used not earlier than in 13th year. This is a waste in
|
||||||
* pgcrypto, as we have very low-frequancy seeding. Here
|
* pgcrypto, as we have very low-frequancy seeding. Here
|
||||||
* is preferable to have all entropy usable in reasonable time.
|
* is preferable to have all entropy usable in reasonable time.
|
||||||
*
|
*
|
||||||
@ -296,7 +296,7 @@ reseed(FState *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pick a random pool. This uses key bytes as random source.
|
* Pick a random pool. This uses key bytes as random source.
|
||||||
*/
|
*/
|
||||||
static unsigned
|
static unsigned
|
||||||
get_rand_pool(FState *st)
|
get_rand_pool(FState *st)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
@ -211,7 +211,7 @@ static int s_vcmp(mp_int a, int v);
|
|||||||
static mp_digit s_uadd(mp_digit *da, mp_digit *db, mp_digit *dc,
|
static mp_digit s_uadd(mp_digit *da, mp_digit *db, mp_digit *dc,
|
||||||
mp_size size_a, mp_size size_b);
|
mp_size size_a, mp_size size_b);
|
||||||
|
|
||||||
/* Unsigned magnitude subtraction. Assumes dc is big enough. */
|
/* Unsigned magnitude subtraction. Assumes dc is big enough. */
|
||||||
static void s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
|
static void s_usub(mp_digit *da, mp_digit *db, mp_digit *dc,
|
||||||
mp_size size_a, mp_size size_b);
|
mp_size size_a, mp_size size_b);
|
||||||
|
|
||||||
@ -2275,7 +2275,7 @@ mp_error_string(mp_result res)
|
|||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
/* Private functions for internal use. These make assumptions. */
|
/* Private functions for internal use. These make assumptions. */
|
||||||
|
|
||||||
/* {{{ s_alloc(num) */
|
/* {{{ s_alloc(num) */
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
@ -90,7 +90,7 @@ pgp_cfb_free(PGP_CFB *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Data processing for normal CFB. (PGP_PKT_SYMENCRYPTED_DATA_MDC)
|
* Data processing for normal CFB. (PGP_PKT_SYMENCRYPTED_DATA_MDC)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
mix_encrypt_normal(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst)
|
mix_encrypt_normal(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
@ -147,7 +147,7 @@ bn_to_mpi(mpz_t *bn)
|
|||||||
*
|
*
|
||||||
* Until I research it further, I just mimic gpg behaviour.
|
* Until I research it further, I just mimic gpg behaviour.
|
||||||
* It has a special mapping table, for values <= 5120,
|
* It has a special mapping table, for values <= 5120,
|
||||||
* above that it uses 'arbitrary high number'. Following
|
* above that it uses 'arbitrary high number'. Following
|
||||||
* algorihm hovers 10-70 bits above gpg values. And for
|
* algorihm hovers 10-70 bits above gpg values. And for
|
||||||
* larger p, it uses gpg's algorihm.
|
* larger p, it uses gpg's algorihm.
|
||||||
*
|
*
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
@ -82,7 +82,7 @@ bn_to_mpi(BIGNUM *bn)
|
|||||||
*
|
*
|
||||||
* Until I research it further, I just mimic gpg behaviour.
|
* Until I research it further, I just mimic gpg behaviour.
|
||||||
* It has a special mapping table, for values <= 5120,
|
* It has a special mapping table, for values <= 5120,
|
||||||
* above that it uses 'arbitrary high number'. Following
|
* above that it uses 'arbitrary high number'. Following
|
||||||
* algorihm hovers 10-70 bits above gpg values. And for
|
* algorihm hovers 10-70 bits above gpg values. And for
|
||||||
* larger p, it uses gpg's algorihm.
|
* larger p, it uses gpg's algorihm.
|
||||||
*
|
*
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
@ -91,7 +91,7 @@ add_block_entropy(PX_MD *md, text *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mix user data into RNG. It is for user own interests to have
|
* Mix user data into RNG. It is for user own interests to have
|
||||||
* RNG state shuffled.
|
* RNG state shuffled.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -308,7 +308,7 @@ set_arg(PGP_Context *ctx, char *key, char *val,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find next word. Handle ',' and '=' as words. Skip whitespace.
|
* Find next word. Handle ',' and '=' as words. Skip whitespace.
|
||||||
* Put word info into res_p, res_len.
|
* Put word info into res_p, res_len.
|
||||||
* Returns ptr to next word.
|
* Returns ptr to next word.
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
/* RIJNDAEL by Joan Daemen and Vincent Rijmen */
|
/* RIJNDAEL by Joan Daemen and Vincent Rijmen */
|
||||||
/* */
|
/* */
|
||||||
/* which is a candidate algorithm in the Advanced Encryption Standard */
|
/* which is a candidate algorithm in the Advanced Encryption Standard */
|
||||||
/* programme of the US National Institute of Standards and Technology. */
|
/* programme of the US National Institute of Standards and Technology. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright in this implementation is held by Dr B R Gladman but I */
|
/* Copyright in this implementation is held by Dr B R Gladman but I */
|
||||||
/* hereby give permission for its free direct or derivative use subject */
|
/* hereby give permission for its free direct or derivative use subject */
|
||||||
/* to acknowledgment of its origin and compliance with any conditions */
|
/* to acknowledgment of its origin and compliance with any conditions */
|
||||||
/* that the originators of the algorithm place on its exploitation. */
|
/* that the originators of the algorithm place on its exploitation. */
|
||||||
/* */
|
/* */
|
||||||
/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */
|
/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ gen_tabs(void)
|
|||||||
/* rijndael specification is in big endian format with */
|
/* rijndael specification is in big endian format with */
|
||||||
/* bit 0 as the most significant bit. In the remainder */
|
/* bit 0 as the most significant bit. In the remainder */
|
||||||
/* of the specification the bits are numbered from the */
|
/* of the specification the bits are numbered from the */
|
||||||
/* least significant end of a byte. */
|
/* least significant end of a byte. */
|
||||||
|
|
||||||
for (i = 0; i < 256; ++i)
|
for (i = 0; i < 256; ++i)
|
||||||
{
|
{
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
/* RIJNDAEL by Joan Daemen and Vincent Rijmen */
|
/* RIJNDAEL by Joan Daemen and Vincent Rijmen */
|
||||||
/* */
|
/* */
|
||||||
/* which is a candidate algorithm in the Advanced Encryption Standard */
|
/* which is a candidate algorithm in the Advanced Encryption Standard */
|
||||||
/* programme of the US National Institute of Standards and Technology. */
|
/* programme of the US National Institute of Standards and Technology. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright in this implementation is held by Dr B R Gladman but I */
|
/* Copyright in this implementation is held by Dr B R Gladman but I */
|
||||||
/* hereby give permission for its free direct or derivative use subject */
|
/* hereby give permission for its free direct or derivative use subject */
|
||||||
/* to acknowledgment of its origin and compliance with any conditions */
|
/* to acknowledgment of its origin and compliance with any conditions */
|
||||||
/* that the originators of the algorithm place on its exploitation. */
|
/* that the originators of the algorithm place on its exploitation. */
|
||||||
/* */
|
/* */
|
||||||
/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */
|
/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
@ -311,7 +311,7 @@ pgstat_heap(Relation rel, FunctionCallInfo fcinfo)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* To avoid physically reading the table twice, try to do the
|
* To avoid physically reading the table twice, try to do the
|
||||||
* free-space scan in parallel with the heap scan. However,
|
* free-space scan in parallel with the heap scan. However,
|
||||||
* heap_getnext may find no tuples on a given page, so we cannot
|
* heap_getnext may find no tuples on a given page, so we cannot
|
||||||
* simply examine the pages returned by the heap scan.
|
* simply examine the pages returned by the heap scan.
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ static void pgfdw_subxact_callback(SubXactEvent event,
|
|||||||
* the right subtransaction nesting depth if we didn't do that already.
|
* the right subtransaction nesting depth if we didn't do that already.
|
||||||
*
|
*
|
||||||
* will_prep_stmt must be true if caller intends to create any prepared
|
* will_prep_stmt must be true if caller intends to create any prepared
|
||||||
* statements. Since those don't go away automatically at transaction end
|
* statements. Since those don't go away automatically at transaction end
|
||||||
* (not even on error), we need this flag to cue manual cleanup.
|
* (not even on error), we need this flag to cue manual cleanup.
|
||||||
*
|
*
|
||||||
* XXX Note that caching connections theoretically requires a mechanism to
|
* XXX Note that caching connections theoretically requires a mechanism to
|
||||||
@ -152,7 +152,7 @@ GetConnection(ForeignServer *server, UserMapping *user,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If cache entry doesn't have a connection, we have to establish a new
|
* If cache entry doesn't have a connection, we have to establish a new
|
||||||
* connection. (If connect_pg_server throws an error, the cache entry
|
* connection. (If connect_pg_server throws an error, the cache entry
|
||||||
* will be left in a valid empty state.)
|
* will be left in a valid empty state.)
|
||||||
*/
|
*/
|
||||||
if (entry->conn == NULL)
|
if (entry->conn == NULL)
|
||||||
@ -273,10 +273,10 @@ connect_pg_server(ForeignServer *server, UserMapping *user)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For non-superusers, insist that the connstr specify a password. This
|
* For non-superusers, insist that the connstr specify a password. This
|
||||||
* prevents a password from being picked up from .pgpass, a service file,
|
* prevents a password from being picked up from .pgpass, a service file,
|
||||||
* the environment, etc. We don't want the postgres user's passwords
|
* the environment, etc. We don't want the postgres user's passwords
|
||||||
* to be accessible to non-superusers. (See also dblink_connstr_check in
|
* to be accessible to non-superusers. (See also dblink_connstr_check in
|
||||||
* contrib/dblink.)
|
* contrib/dblink.)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -323,10 +323,10 @@ configure_remote_session(PGconn *conn)
|
|||||||
/*
|
/*
|
||||||
* Set remote timezone; this is basically just cosmetic, since all
|
* Set remote timezone; this is basically just cosmetic, since all
|
||||||
* transmitted and returned timestamptzs should specify a zone explicitly
|
* transmitted and returned timestamptzs should specify a zone explicitly
|
||||||
* anyway. However it makes the regression test outputs more predictable.
|
* anyway. However it makes the regression test outputs more predictable.
|
||||||
*
|
*
|
||||||
* We don't risk setting remote zone equal to ours, since the remote
|
* We don't risk setting remote zone equal to ours, since the remote
|
||||||
* server might use a different timezone database. Instead, use UTC
|
* server might use a different timezone database. Instead, use UTC
|
||||||
* (quoted, because very old servers are picky about case).
|
* (quoted, because very old servers are picky about case).
|
||||||
*/
|
*/
|
||||||
do_sql_command(conn, "SET timezone = 'UTC'");
|
do_sql_command(conn, "SET timezone = 'UTC'");
|
||||||
|
@ -214,7 +214,7 @@ is_foreign_expr(PlannerInfo *root,
|
|||||||
* We must check that the expression contains only node types we can deparse,
|
* We must check that the expression contains only node types we can deparse,
|
||||||
* that all types/functions/operators are safe to send (which we approximate
|
* that all types/functions/operators are safe to send (which we approximate
|
||||||
* as being built-in), and that all collations used in the expression derive
|
* as being built-in), and that all collations used in the expression derive
|
||||||
* from Vars of the foreign table. Because of the latter, the logic is
|
* from Vars of the foreign table. Because of the latter, the logic is
|
||||||
* pretty close to assign_collations_walker() in parse_collate.c, though we
|
* pretty close to assign_collations_walker() in parse_collate.c, though we
|
||||||
* can assume here that the given expression is valid.
|
* can assume here that the given expression is valid.
|
||||||
*/
|
*/
|
||||||
@ -244,7 +244,7 @@ foreign_expr_walker(Node *node,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If the Var is from the foreign table, we consider its
|
* If the Var is from the foreign table, we consider its
|
||||||
* collation (if any) safe to use. If it is from another
|
* collation (if any) safe to use. If it is from another
|
||||||
* table, we treat its collation the same way as we would a
|
* table, we treat its collation the same way as we would a
|
||||||
* Param's collation, ie it's not safe for it to have a
|
* Param's collation, ie it's not safe for it to have a
|
||||||
* non-default collation.
|
* non-default collation.
|
||||||
@ -370,7 +370,7 @@ foreign_expr_walker(Node *node,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Detect whether node is introducing a collation not derived
|
* Detect whether node is introducing a collation not derived
|
||||||
* from a foreign Var. (If so, we just mark it unsafe for now
|
* from a foreign Var. (If so, we just mark it unsafe for now
|
||||||
* rather than immediately returning false, since the parent
|
* rather than immediately returning false, since the parent
|
||||||
* node might not care.)
|
* node might not care.)
|
||||||
*/
|
*/
|
||||||
@ -657,7 +657,7 @@ is_builtin(Oid oid)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Construct a simple SELECT statement that retrieves desired columns
|
* Construct a simple SELECT statement that retrieves desired columns
|
||||||
* of the specified foreign table, and append it to "buf". The output
|
* of the specified foreign table, and append it to "buf". The output
|
||||||
* contains just "SELECT ... FROM tablename".
|
* contains just "SELECT ... FROM tablename".
|
||||||
*
|
*
|
||||||
* We also create an integer List of the columns being retrieved, which is
|
* We also create an integer List of the columns being retrieved, which is
|
||||||
@ -745,7 +745,7 @@ deparseTargetList(StringInfo buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add ctid if needed. We currently don't support retrieving any other
|
* Add ctid if needed. We currently don't support retrieving any other
|
||||||
* system columns.
|
* system columns.
|
||||||
*/
|
*/
|
||||||
if (bms_is_member(SelfItemPointerAttributeNumber - FirstLowInvalidHeapAttributeNumber,
|
if (bms_is_member(SelfItemPointerAttributeNumber - FirstLowInvalidHeapAttributeNumber,
|
||||||
@ -1436,7 +1436,7 @@ deparseArrayRef(ArrayRef *node, deparse_expr_cxt *context)
|
|||||||
/*
|
/*
|
||||||
* Deparse referenced array expression first. If that expression includes
|
* Deparse referenced array expression first. If that expression includes
|
||||||
* a cast, we have to parenthesize to prevent the array subscript from
|
* a cast, we have to parenthesize to prevent the array subscript from
|
||||||
* being taken as typename decoration. We can avoid that in the typical
|
* being taken as typename decoration. We can avoid that in the typical
|
||||||
* case of subscripting a Var, but otherwise do it.
|
* case of subscripting a Var, but otherwise do it.
|
||||||
*/
|
*/
|
||||||
if (IsA(node->refexpr, Var))
|
if (IsA(node->refexpr, Var))
|
||||||
@ -1556,7 +1556,7 @@ deparseFuncExpr(FuncExpr *node, deparse_expr_cxt *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deparse given operator expression. To avoid problems around
|
* Deparse given operator expression. To avoid problems around
|
||||||
* priority of operations, we always parenthesize the arguments.
|
* priority of operations, we always parenthesize the arguments.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -1653,7 +1653,7 @@ deparseDistinctExpr(DistinctExpr *node, deparse_expr_cxt *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deparse given ScalarArrayOpExpr expression. To avoid problems
|
* Deparse given ScalarArrayOpExpr expression. To avoid problems
|
||||||
* around priority of operations, we always parenthesize the arguments.
|
* around priority of operations, we always parenthesize the arguments.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -1819,7 +1819,7 @@ printRemoteParam(int paramindex, Oid paramtype, int32 paramtypmod,
|
|||||||
* This is used when we're just trying to EXPLAIN the remote query.
|
* This is used when we're just trying to EXPLAIN the remote query.
|
||||||
* We don't have the actual value of the runtime parameter yet, and we don't
|
* We don't have the actual value of the runtime parameter yet, and we don't
|
||||||
* want the remote planner to generate a plan that depends on such a value
|
* want the remote planner to generate a plan that depends on such a value
|
||||||
* anyway. Thus, we can't do something simple like "$1::paramtype".
|
* anyway. Thus, we can't do something simple like "$1::paramtype".
|
||||||
* Instead, we emit "((SELECT null::paramtype)::paramtype)".
|
* Instead, we emit "((SELECT null::paramtype)::paramtype)".
|
||||||
* In all extant versions of Postgres, the planner will see that as an unknown
|
* In all extant versions of Postgres, the planner will see that as an unknown
|
||||||
* constant value, which is what we want. This might need adjustment if we
|
* constant value, which is what we want. This might need adjustment if we
|
||||||
|
@ -268,7 +268,7 @@ is_libpq_option(const char *keyword)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Generate key-value arrays which include only libpq options from the
|
* Generate key-value arrays which include only libpq options from the
|
||||||
* given list (which can contain any kind of options). Caller must have
|
* given list (which can contain any kind of options). Caller must have
|
||||||
* allocated large-enough arrays. Returns number of options found.
|
* allocated large-enough arrays. Returns number of options found.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
|
@ -90,7 +90,7 @@ typedef struct PgFdwRelationInfo
|
|||||||
* 2) Integer list of attribute numbers retrieved by the SELECT
|
* 2) Integer list of attribute numbers retrieved by the SELECT
|
||||||
*
|
*
|
||||||
* These items are indexed with the enum FdwScanPrivateIndex, so an item
|
* These items are indexed with the enum FdwScanPrivateIndex, so an item
|
||||||
* can be fetched with list_nth(). For example, to get the SELECT statement:
|
* can be fetched with list_nth(). For example, to get the SELECT statement:
|
||||||
* sql = strVal(list_nth(fdw_private, FdwScanPrivateSelectSql));
|
* sql = strVal(list_nth(fdw_private, FdwScanPrivateSelectSql));
|
||||||
*/
|
*/
|
||||||
enum FdwScanPrivateIndex
|
enum FdwScanPrivateIndex
|
||||||
@ -426,8 +426,8 @@ postgresGetForeignRelSize(PlannerInfo *root,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If the table or the server is configured to use remote estimates,
|
* If the table or the server is configured to use remote estimates,
|
||||||
* identify which user to do remote access as during planning. This
|
* identify which user to do remote access as during planning. This
|
||||||
* should match what ExecCheckRTEPerms() does. If we fail due to lack of
|
* should match what ExecCheckRTEPerms() does. If we fail due to lack of
|
||||||
* permissions, the query would have failed at runtime anyway.
|
* permissions, the query would have failed at runtime anyway.
|
||||||
*/
|
*/
|
||||||
if (fpinfo->use_remote_estimate)
|
if (fpinfo->use_remote_estimate)
|
||||||
@ -449,7 +449,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Identify which attributes will need to be retrieved from the remote
|
* Identify which attributes will need to be retrieved from the remote
|
||||||
* server. These include all attrs needed for joins or final output, plus
|
* server. These include all attrs needed for joins or final output, plus
|
||||||
* all attrs used in the local_conds. (Note: if we end up using a
|
* all attrs used in the local_conds. (Note: if we end up using a
|
||||||
* parameterized scan, it's possible that some of the join clauses will be
|
* parameterized scan, it's possible that some of the join clauses will be
|
||||||
* sent to the remote and thus we wouldn't really need to retrieve the
|
* sent to the remote and thus we wouldn't really need to retrieve the
|
||||||
@ -489,7 +489,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
|
|||||||
if (fpinfo->use_remote_estimate)
|
if (fpinfo->use_remote_estimate)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Get cost/size estimates with help of remote server. Save the
|
* Get cost/size estimates with help of remote server. Save the
|
||||||
* values in fpinfo so we don't need to do it again to generate the
|
* values in fpinfo so we don't need to do it again to generate the
|
||||||
* basic foreign path.
|
* basic foreign path.
|
||||||
*/
|
*/
|
||||||
@ -759,7 +759,7 @@ postgresGetForeignPlan(PlannerInfo *root,
|
|||||||
* remote-safety.
|
* remote-safety.
|
||||||
*
|
*
|
||||||
* Note: the join clauses we see here should be the exact same ones
|
* Note: the join clauses we see here should be the exact same ones
|
||||||
* previously examined by postgresGetForeignPaths. Possibly it'd be worth
|
* previously examined by postgresGetForeignPaths. Possibly it'd be worth
|
||||||
* passing forward the classification work done then, rather than
|
* passing forward the classification work done then, rather than
|
||||||
* repeating it here.
|
* repeating it here.
|
||||||
*
|
*
|
||||||
@ -900,7 +900,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
|
|||||||
node->fdw_state = (void *) fsstate;
|
node->fdw_state = (void *) fsstate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Identify which user to do the remote access as. This should match what
|
* Identify which user to do the remote access as. This should match what
|
||||||
* ExecCheckRTEPerms() does.
|
* ExecCheckRTEPerms() does.
|
||||||
*/
|
*/
|
||||||
rte = rt_fetch(fsplan->scan.scanrelid, estate->es_range_table);
|
rte = rt_fetch(fsplan->scan.scanrelid, estate->es_range_table);
|
||||||
@ -964,7 +964,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
|
|||||||
* Prepare remote-parameter expressions for evaluation. (Note: in
|
* Prepare remote-parameter expressions for evaluation. (Note: in
|
||||||
* practice, we expect that all these expressions will be just Params, so
|
* practice, we expect that all these expressions will be just Params, so
|
||||||
* we could possibly do something more efficient than using the full
|
* we could possibly do something more efficient than using the full
|
||||||
* expression-eval machinery for this. But probably there would be little
|
* expression-eval machinery for this. But probably there would be little
|
||||||
* benefit, and it'd require postgres_fdw to know more than is desirable
|
* benefit, and it'd require postgres_fdw to know more than is desirable
|
||||||
* about Param evaluation.)
|
* about Param evaluation.)
|
||||||
*/
|
*/
|
||||||
@ -1040,8 +1040,8 @@ postgresReScanForeignScan(ForeignScanState *node)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If any internal parameters affecting this node have changed, we'd
|
* If any internal parameters affecting this node have changed, we'd
|
||||||
* better destroy and recreate the cursor. Otherwise, rewinding it should
|
* better destroy and recreate the cursor. Otherwise, rewinding it should
|
||||||
* be good enough. If we've only fetched zero or one batch, we needn't
|
* be good enough. If we've only fetched zero or one batch, we needn't
|
||||||
* even rewind the cursor, just rescan what we have.
|
* even rewind the cursor, just rescan what we have.
|
||||||
*/
|
*/
|
||||||
if (node->ss.ps.chgParam != NULL)
|
if (node->ss.ps.chgParam != NULL)
|
||||||
@ -1147,9 +1147,9 @@ postgresAddForeignUpdateTargets(Query *parsetree,
|
|||||||
* Note: currently, the plan tree generated for UPDATE/DELETE will always
|
* Note: currently, the plan tree generated for UPDATE/DELETE will always
|
||||||
* include a ForeignScan that retrieves ctids (using SELECT FOR UPDATE)
|
* include a ForeignScan that retrieves ctids (using SELECT FOR UPDATE)
|
||||||
* and then the ModifyTable node will have to execute individual remote
|
* and then the ModifyTable node will have to execute individual remote
|
||||||
* UPDATE/DELETE commands. If there are no local conditions or joins
|
* UPDATE/DELETE commands. If there are no local conditions or joins
|
||||||
* needed, it'd be better to let the scan node do UPDATE/DELETE RETURNING
|
* needed, it'd be better to let the scan node do UPDATE/DELETE RETURNING
|
||||||
* and then do nothing at ModifyTable. Room for future optimization ...
|
* and then do nothing at ModifyTable. Room for future optimization ...
|
||||||
*/
|
*/
|
||||||
static List *
|
static List *
|
||||||
postgresPlanForeignModify(PlannerInfo *root,
|
postgresPlanForeignModify(PlannerInfo *root,
|
||||||
@ -1287,7 +1287,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate,
|
|||||||
fmstate->rel = rel;
|
fmstate->rel = rel;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Identify which user to do the remote access as. This should match what
|
* Identify which user to do the remote access as. This should match what
|
||||||
* ExecCheckRTEPerms() does.
|
* ExecCheckRTEPerms() does.
|
||||||
*/
|
*/
|
||||||
rte = rt_fetch(resultRelInfo->ri_RangeTableIndex, estate->es_range_table);
|
rte = rt_fetch(resultRelInfo->ri_RangeTableIndex, estate->es_range_table);
|
||||||
@ -1852,7 +1852,7 @@ get_remote_estimate(const char *sql, PGconn *conn,
|
|||||||
pgfdw_report_error(ERROR, res, conn, false, sql);
|
pgfdw_report_error(ERROR, res, conn, false, sql);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Extract cost numbers for topmost plan node. Note we search for a
|
* Extract cost numbers for topmost plan node. Note we search for a
|
||||||
* left paren from the end of the line to avoid being confused by
|
* left paren from the end of the line to avoid being confused by
|
||||||
* other uses of parentheses.
|
* other uses of parentheses.
|
||||||
*/
|
*/
|
||||||
@ -1974,7 +1974,7 @@ create_cursor(ForeignScanState *node)
|
|||||||
* Notice that we pass NULL for paramTypes, thus forcing the remote server
|
* Notice that we pass NULL for paramTypes, thus forcing the remote server
|
||||||
* to infer types for all parameters. Since we explicitly cast every
|
* to infer types for all parameters. Since we explicitly cast every
|
||||||
* parameter (see deparse.c), the "inference" is trivial and will produce
|
* parameter (see deparse.c), the "inference" is trivial and will produce
|
||||||
* the desired result. This allows us to avoid assuming that the remote
|
* the desired result. This allows us to avoid assuming that the remote
|
||||||
* server has the same OIDs we do for the parameters' types.
|
* server has the same OIDs we do for the parameters' types.
|
||||||
*
|
*
|
||||||
* We don't use a PG_TRY block here, so be careful not to throw error
|
* We don't use a PG_TRY block here, so be careful not to throw error
|
||||||
@ -2083,7 +2083,7 @@ fetch_more_data(ForeignScanState *node)
|
|||||||
* user-visible computations.
|
* user-visible computations.
|
||||||
*
|
*
|
||||||
* We use the equivalent of a function SET option to allow the settings to
|
* We use the equivalent of a function SET option to allow the settings to
|
||||||
* persist only until the caller calls reset_transmission_modes(). If an
|
* persist only until the caller calls reset_transmission_modes(). If an
|
||||||
* error is thrown in between, guc.c will take care of undoing the settings.
|
* error is thrown in between, guc.c will take care of undoing the settings.
|
||||||
*
|
*
|
||||||
* The return value is the nestlevel that must be passed to
|
* The return value is the nestlevel that must be passed to
|
||||||
@ -2095,7 +2095,7 @@ set_transmission_modes(void)
|
|||||||
int nestlevel = NewGUCNestLevel();
|
int nestlevel = NewGUCNestLevel();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The values set here should match what pg_dump does. See also
|
* The values set here should match what pg_dump does. See also
|
||||||
* configure_remote_session in connection.c.
|
* configure_remote_session in connection.c.
|
||||||
*/
|
*/
|
||||||
if (DateStyle != USE_ISO_DATES)
|
if (DateStyle != USE_ISO_DATES)
|
||||||
@ -2301,7 +2301,7 @@ postgresAnalyzeForeignTable(Relation relation,
|
|||||||
*func = postgresAcquireSampleRowsFunc;
|
*func = postgresAcquireSampleRowsFunc;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now we have to get the number of pages. It's annoying that the ANALYZE
|
* Now we have to get the number of pages. It's annoying that the ANALYZE
|
||||||
* API requires us to return that now, because it forces some duplication
|
* API requires us to return that now, because it forces some duplication
|
||||||
* of effort between this routine and postgresAcquireSampleRowsFunc. But
|
* of effort between this routine and postgresAcquireSampleRowsFunc. But
|
||||||
* it's probably not worth redefining that API at this point.
|
* it's probably not worth redefining that API at this point.
|
||||||
@ -2358,7 +2358,7 @@ postgresAnalyzeForeignTable(Relation relation,
|
|||||||
* which must have at least targrows entries.
|
* which must have at least targrows entries.
|
||||||
* The actual number of rows selected is returned as the function result.
|
* The actual number of rows selected is returned as the function result.
|
||||||
* We also count the total number of rows in the table and return it into
|
* We also count the total number of rows in the table and return it into
|
||||||
* *totalrows. Note that *totaldeadrows is always set to 0.
|
* *totalrows. Note that *totaldeadrows is always set to 0.
|
||||||
*
|
*
|
||||||
* Note that the returned list of rows is not always in order by physical
|
* Note that the returned list of rows is not always in order by physical
|
||||||
* position in the table. Therefore, correlation estimates derived later
|
* position in the table. Therefore, correlation estimates derived later
|
||||||
@ -2689,7 +2689,7 @@ make_tuple_from_result_row(PGresult *res,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Callback function which is called when error occurs during column value
|
* Callback function which is called when error occurs during column value
|
||||||
* conversion. Print names of column and relation.
|
* conversion. Print names of column and relation.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
conversion_error_callback(void *arg)
|
conversion_error_callback(void *arg)
|
||||||
|
@ -106,7 +106,7 @@ sepgsql_get_client_label(void)
|
|||||||
* sepgsql_set_client_label
|
* sepgsql_set_client_label
|
||||||
*
|
*
|
||||||
* This routine tries to switch the current security label of the client, and
|
* This routine tries to switch the current security label of the client, and
|
||||||
* checks related permissions. The supplied new label shall be added to the
|
* checks related permissions. The supplied new label shall be added to the
|
||||||
* client_label_pending list, then saved at transaction-commit time to ensure
|
* client_label_pending list, then saved at transaction-commit time to ensure
|
||||||
* transaction-awareness.
|
* transaction-awareness.
|
||||||
*/
|
*/
|
||||||
@ -161,7 +161,7 @@ sepgsql_set_client_label(const char *new_label)
|
|||||||
/*
|
/*
|
||||||
* sepgsql_xact_callback
|
* sepgsql_xact_callback
|
||||||
*
|
*
|
||||||
* A callback routine of transaction commit/abort/prepare. Commmit or abort
|
* A callback routine of transaction commit/abort/prepare. Commmit or abort
|
||||||
* changes in the client_label_pending list.
|
* changes in the client_label_pending list.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
@ -142,7 +142,7 @@ sepgsql_avc_reclaim(void)
|
|||||||
* Access control decisions must be atomic, but multiple system calls may
|
* Access control decisions must be atomic, but multiple system calls may
|
||||||
* be required to make a decision; thus, when referencing the access vector
|
* be required to make a decision; thus, when referencing the access vector
|
||||||
* cache, we must loop until we complete without an intervening cache flush
|
* cache, we must loop until we complete without an intervening cache flush
|
||||||
* event. In practice, looping even once should be very rare. Callers should
|
* event. In practice, looping even once should be very rare. Callers should
|
||||||
* do something like this:
|
* do something like this:
|
||||||
*
|
*
|
||||||
* sepgsql_avc_check_valid();
|
* sepgsql_avc_check_valid();
|
||||||
|
@ -48,17 +48,17 @@ static EPlan *find_plan(char *ident, EPlan **eplan, int *nplans);
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* timetravel () --
|
* timetravel () --
|
||||||
* 1. IF an update affects tuple with stop_date eq INFINITY
|
* 1. IF an update affects tuple with stop_date eq INFINITY
|
||||||
* then form (and return) new tuple with start_date eq current date
|
* then form (and return) new tuple with start_date eq current date
|
||||||
* and stop_date eq INFINITY [ and update_user eq current user ]
|
* and stop_date eq INFINITY [ and update_user eq current user ]
|
||||||
* and all other column values as in new tuple, and insert tuple
|
* and all other column values as in new tuple, and insert tuple
|
||||||
* with old data and stop_date eq current date
|
* with old data and stop_date eq current date
|
||||||
* ELSE - skip updation of tuple.
|
* ELSE - skip updation of tuple.
|
||||||
* 2. IF an delete affects tuple with stop_date eq INFINITY
|
* 2. IF an delete affects tuple with stop_date eq INFINITY
|
||||||
* then insert the same tuple with stop_date eq current date
|
* then insert the same tuple with stop_date eq current date
|
||||||
* [ and delete_user eq current user ]
|
* [ and delete_user eq current user ]
|
||||||
* ELSE - skip deletion of tuple.
|
* ELSE - skip deletion of tuple.
|
||||||
* 3. On INSERT, if start_date is NULL then current date will be
|
* 3. On INSERT, if start_date is NULL then current date will be
|
||||||
* inserted, if stop_date is NULL then INFINITY will be inserted.
|
* inserted, if stop_date is NULL then INFINITY will be inserted.
|
||||||
* [ and insert_user eq current user, update_user and delete_user
|
* [ and insert_user eq current user, update_user and delete_user
|
||||||
* eq NULL ]
|
* eq NULL ]
|
||||||
|
@ -132,7 +132,7 @@ ssl_client_serial(PG_FUNCTION_ARGS)
|
|||||||
* current database encoding if possible. Any invalid characters are
|
* current database encoding if possible. Any invalid characters are
|
||||||
* replaced by question marks.
|
* replaced by question marks.
|
||||||
*
|
*
|
||||||
* Parameter: str - OpenSSL ASN1_STRING structure. Memory management
|
* Parameter: str - OpenSSL ASN1_STRING structure. Memory management
|
||||||
* of this structure is responsibility of caller.
|
* of this structure is responsibility of caller.
|
||||||
*
|
*
|
||||||
* Returns Datum, which can be directly returned from a C language SQL
|
* Returns Datum, which can be directly returned from a C language SQL
|
||||||
|
@ -53,7 +53,7 @@ strcpy_quoted(StringInfo r, const char *s, const char q)
|
|||||||
* triggered_change_notification
|
* triggered_change_notification
|
||||||
*
|
*
|
||||||
* This trigger function will send a notification of data modification with
|
* This trigger function will send a notification of data modification with
|
||||||
* primary key values. The channel will be "tcn" unless the trigger is
|
* primary key values. The channel will be "tcn" unless the trigger is
|
||||||
* created with a parameter, in which case that parameter will be used.
|
* created with a parameter, in which case that parameter will be used.
|
||||||
*/
|
*/
|
||||||
PG_FUNCTION_INFO_V1(triggered_change_notification);
|
PG_FUNCTION_INFO_V1(triggered_change_notification);
|
||||||
|
@ -185,7 +185,7 @@ worker_spi_main(Datum main_arg)
|
|||||||
initialize_worker_spi(table);
|
initialize_worker_spi(table);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Quote identifiers passed to us. Note that this must be done after
|
* Quote identifiers passed to us. Note that this must be done after
|
||||||
* initialize_worker_spi, because that routine assumes the names are not
|
* initialize_worker_spi, because that routine assumes the names are not
|
||||||
* quoted.
|
* quoted.
|
||||||
*
|
*
|
||||||
@ -247,7 +247,7 @@ worker_spi_main(Datum main_arg)
|
|||||||
* StartTransactionCommand() call should be preceded by a
|
* StartTransactionCommand() call should be preceded by a
|
||||||
* SetCurrentStatementStartTimestamp() call, which sets both the time
|
* SetCurrentStatementStartTimestamp() call, which sets both the time
|
||||||
* for the statement we're about the run, and also the transaction
|
* for the statement we're about the run, and also the transaction
|
||||||
* start time. Also, each other query sent to SPI should probably be
|
* start time. Also, each other query sent to SPI should probably be
|
||||||
* preceded by SetCurrentStatementStartTimestamp(), so that statement
|
* preceded by SetCurrentStatementStartTimestamp(), so that statement
|
||||||
* start time is always up to date.
|
* start time is always up to date.
|
||||||
*
|
*
|
||||||
|
@ -720,7 +720,7 @@ xpath_table(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear the values array, so that not-well-formed documents
|
* Clear the values array, so that not-well-formed documents
|
||||||
* return NULL in all columns. Note that this also means that
|
* return NULL in all columns. Note that this also means that
|
||||||
* spare columns will be NULL.
|
* spare columns will be NULL.
|
||||||
*/
|
*/
|
||||||
for (j = 0; j < ret_tupdesc->natts; j++)
|
for (j = 0; j < ret_tupdesc->natts; j++)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
* tuptoaster.c.
|
* tuptoaster.c.
|
||||||
*
|
*
|
||||||
* This change will break any code that assumes it needn't detoast values
|
* This change will break any code that assumes it needn't detoast values
|
||||||
* that have been put into a tuple but never sent to disk. Hopefully there
|
* that have been put into a tuple but never sent to disk. Hopefully there
|
||||||
* are few such places.
|
* are few such places.
|
||||||
*
|
*
|
||||||
* Varlenas still have alignment 'i' (or 'd') in pg_type/pg_attribute, since
|
* Varlenas still have alignment 'i' (or 'd') in pg_type/pg_attribute, since
|
||||||
@ -387,7 +387,7 @@ nocachegetattr(HeapTuple tuple,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Otherwise, check for non-fixed-length attrs up to and including
|
* Otherwise, check for non-fixed-length attrs up to and including
|
||||||
* target. If there aren't any, it's safe to cheaply initialize the
|
* target. If there aren't any, it's safe to cheaply initialize the
|
||||||
* cached offsets for these attrs.
|
* cached offsets for these attrs.
|
||||||
*/
|
*/
|
||||||
if (HeapTupleHasVarWidth(tuple))
|
if (HeapTupleHasVarWidth(tuple))
|
||||||
@ -454,7 +454,7 @@ nocachegetattr(HeapTuple tuple,
|
|||||||
*
|
*
|
||||||
* Note - This loop is a little tricky. For each non-null attribute,
|
* Note - This loop is a little tricky. For each non-null attribute,
|
||||||
* we have to first account for alignment padding before the attr,
|
* we have to first account for alignment padding before the attr,
|
||||||
* then advance over the attr based on its length. Nulls have no
|
* then advance over the attr based on its length. Nulls have no
|
||||||
* storage and no alignment padding either. We can use/set
|
* storage and no alignment padding either. We can use/set
|
||||||
* attcacheoff until we reach either a null or a var-width attribute.
|
* attcacheoff until we reach either a null or a var-width attribute.
|
||||||
*/
|
*/
|
||||||
@ -549,7 +549,7 @@ heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* cmin and cmax are now both aliases for the same field, which
|
* cmin and cmax are now both aliases for the same field, which
|
||||||
* can in fact also be a combo command id. XXX perhaps we should
|
* can in fact also be a combo command id. XXX perhaps we should
|
||||||
* return the "real" cmin or cmax if possible, that is if we are
|
* return the "real" cmin or cmax if possible, that is if we are
|
||||||
* inside the originating transaction?
|
* inside the originating transaction?
|
||||||
*/
|
*/
|
||||||
@ -709,7 +709,7 @@ heap_form_tuple(TupleDesc tupleDescriptor,
|
|||||||
len += data_len;
|
len += data_len;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate and zero the space needed. Note that the tuple body and
|
* Allocate and zero the space needed. Note that the tuple body and
|
||||||
* HeapTupleData management structure are allocated in one chunk.
|
* HeapTupleData management structure are allocated in one chunk.
|
||||||
*/
|
*/
|
||||||
tuple = (HeapTuple) palloc0(HEAPTUPLESIZE + len);
|
tuple = (HeapTuple) palloc0(HEAPTUPLESIZE + len);
|
||||||
|
@ -71,7 +71,7 @@ index_form_tuple(TupleDesc tupleDescriptor,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* If value is stored EXTERNAL, must fetch it so we are not depending
|
* If value is stored EXTERNAL, must fetch it so we are not depending
|
||||||
* on outside storage. This should be improved someday.
|
* on outside storage. This should be improved someday.
|
||||||
*/
|
*/
|
||||||
if (VARATT_IS_EXTERNAL(DatumGetPointer(values[i])))
|
if (VARATT_IS_EXTERNAL(DatumGetPointer(values[i])))
|
||||||
{
|
{
|
||||||
@ -281,7 +281,7 @@ nocache_index_getattr(IndexTuple tup,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Otherwise, check for non-fixed-length attrs up to and including
|
* Otherwise, check for non-fixed-length attrs up to and including
|
||||||
* target. If there aren't any, it's safe to cheaply initialize the
|
* target. If there aren't any, it's safe to cheaply initialize the
|
||||||
* cached offsets for these attrs.
|
* cached offsets for these attrs.
|
||||||
*/
|
*/
|
||||||
if (IndexTupleHasVarwidths(tup))
|
if (IndexTupleHasVarwidths(tup))
|
||||||
@ -348,7 +348,7 @@ nocache_index_getattr(IndexTuple tup,
|
|||||||
*
|
*
|
||||||
* Note - This loop is a little tricky. For each non-null attribute,
|
* Note - This loop is a little tricky. For each non-null attribute,
|
||||||
* we have to first account for alignment padding before the attr,
|
* we have to first account for alignment padding before the attr,
|
||||||
* then advance over the attr based on its length. Nulls have no
|
* then advance over the attr based on its length. Nulls have no
|
||||||
* storage and no alignment padding either. We can use/set
|
* storage and no alignment padding either. We can use/set
|
||||||
* attcacheoff until we reach either a null or a var-width attribute.
|
* attcacheoff until we reach either a null or a var-width attribute.
|
||||||
*/
|
*/
|
||||||
|
@ -181,7 +181,7 @@ printtup_startup(DestReceiver *self, int operation, TupleDesc typeinfo)
|
|||||||
* or some similar function; it does not contain a full set of fields.
|
* or some similar function; it does not contain a full set of fields.
|
||||||
* The targetlist will be NIL when executing a utility function that does
|
* The targetlist will be NIL when executing a utility function that does
|
||||||
* not have a plan. If the targetlist isn't NIL then it is a Query node's
|
* not have a plan. If the targetlist isn't NIL then it is a Query node's
|
||||||
* targetlist; it is up to us to ignore resjunk columns in it. The formats[]
|
* targetlist; it is up to us to ignore resjunk columns in it. The formats[]
|
||||||
* array pointer might be NULL (if we are doing Describe on a prepared stmt);
|
* array pointer might be NULL (if we are doing Describe on a prepared stmt);
|
||||||
* send zeroes for the format codes in that case.
|
* send zeroes for the format codes in that case.
|
||||||
*/
|
*/
|
||||||
|
@ -519,7 +519,7 @@ add_real_reloption(bits32 kinds, char *name, char *desc, double default_val,
|
|||||||
* Add a new string reloption
|
* Add a new string reloption
|
||||||
*
|
*
|
||||||
* "validator" is an optional function pointer that can be used to test the
|
* "validator" is an optional function pointer that can be used to test the
|
||||||
* validity of the values. It must elog(ERROR) when the argument string is
|
* validity of the values. It must elog(ERROR) when the argument string is
|
||||||
* not acceptable for the variable. Note that the default value must pass
|
* not acceptable for the variable. Note that the default value must pass
|
||||||
* the validation.
|
* the validation.
|
||||||
*/
|
*/
|
||||||
@ -847,7 +847,7 @@ extractRelOptions(HeapTuple tuple, TupleDesc tupdesc, Oid amoptions)
|
|||||||
* is returned.
|
* is returned.
|
||||||
*
|
*
|
||||||
* Note: values of type int, bool and real are allocated as part of the
|
* Note: values of type int, bool and real are allocated as part of the
|
||||||
* returned array. Values of type string are allocated separately and must
|
* returned array. Values of type string are allocated separately and must
|
||||||
* be freed by the caller.
|
* be freed by the caller.
|
||||||
*/
|
*/
|
||||||
relopt_value *
|
relopt_value *
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* These functions provide conversion between rowtypes that are logically
|
* These functions provide conversion between rowtypes that are logically
|
||||||
* equivalent but might have columns in a different order or different sets
|
* equivalent but might have columns in a different order or different sets
|
||||||
* of dropped columns. There is some overlap of functionality with the
|
* of dropped columns. There is some overlap of functionality with the
|
||||||
* executor's "junkfilter" routines, but these functions work on bare
|
* executor's "junkfilter" routines, but these functions work on bare
|
||||||
* HeapTuples rather than TupleTableSlots.
|
* HeapTuples rather than TupleTableSlots.
|
||||||
*
|
*
|
||||||
|
@ -540,7 +540,7 @@ TupleDescInitEntryCollation(TupleDesc desc,
|
|||||||
* Given a relation schema (list of ColumnDef nodes), build a TupleDesc.
|
* Given a relation schema (list of ColumnDef nodes), build a TupleDesc.
|
||||||
*
|
*
|
||||||
* Note: the default assumption is no OIDs; caller may modify the returned
|
* Note: the default assumption is no OIDs; caller may modify the returned
|
||||||
* TupleDesc if it wants OIDs. Also, tdtypeid will need to be filled in
|
* TupleDesc if it wants OIDs. Also, tdtypeid will need to be filled in
|
||||||
* later on.
|
* later on.
|
||||||
*/
|
*/
|
||||||
TupleDesc
|
TupleDesc
|
||||||
|
@ -197,7 +197,7 @@ ginarrayconsistent(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Must have all elements in check[] true; no discrimination
|
* Must have all elements in check[] true; no discrimination
|
||||||
* against nulls here. This is because array_contain_compare and
|
* against nulls here. This is because array_contain_compare and
|
||||||
* array_eq handle nulls differently ...
|
* array_eq handle nulls differently ...
|
||||||
*/
|
*/
|
||||||
res = true;
|
res = true;
|
||||||
|
@ -187,7 +187,7 @@ ginInsertBAEntry(BuildAccumulator *accum,
|
|||||||
* Since the entries are being inserted into a balanced binary tree, you
|
* Since the entries are being inserted into a balanced binary tree, you
|
||||||
* might think that the order of insertion wouldn't be critical, but it turns
|
* might think that the order of insertion wouldn't be critical, but it turns
|
||||||
* out that inserting the entries in sorted order results in a lot of
|
* out that inserting the entries in sorted order results in a lot of
|
||||||
* rebalancing operations and is slow. To prevent this, we attempt to insert
|
* rebalancing operations and is slow. To prevent this, we attempt to insert
|
||||||
* the nodes in an order that will produce a nearly-balanced tree if the input
|
* the nodes in an order that will produce a nearly-balanced tree if the input
|
||||||
* is in fact sorted.
|
* is in fact sorted.
|
||||||
*
|
*
|
||||||
|
@ -163,7 +163,7 @@ GinShortenTuple(IndexTuple itup, uint32 nipd)
|
|||||||
* Form a non-leaf entry tuple by copying the key data from the given tuple,
|
* Form a non-leaf entry tuple by copying the key data from the given tuple,
|
||||||
* which can be either a leaf or non-leaf entry tuple.
|
* which can be either a leaf or non-leaf entry tuple.
|
||||||
*
|
*
|
||||||
* Any posting list in the source tuple is not copied. The specified child
|
* Any posting list in the source tuple is not copied. The specified child
|
||||||
* block number is inserted into t_tid.
|
* block number is inserted into t_tid.
|
||||||
*/
|
*/
|
||||||
static IndexTuple
|
static IndexTuple
|
||||||
|
@ -440,7 +440,7 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
|
|||||||
* Create temporary index tuples for a single indexable item (one index column
|
* Create temporary index tuples for a single indexable item (one index column
|
||||||
* for the heap tuple specified by ht_ctid), and append them to the array
|
* for the heap tuple specified by ht_ctid), and append them to the array
|
||||||
* in *collector. They will subsequently be written out using
|
* in *collector. They will subsequently be written out using
|
||||||
* ginHeapTupleFastInsert. Note that to guarantee consistent state, all
|
* ginHeapTupleFastInsert. Note that to guarantee consistent state, all
|
||||||
* temp tuples for a given heap tuple must be written in one call to
|
* temp tuples for a given heap tuple must be written in one call to
|
||||||
* ginHeapTupleFastInsert.
|
* ginHeapTupleFastInsert.
|
||||||
*/
|
*/
|
||||||
@ -707,7 +707,7 @@ processPendingPage(BuildAccumulator *accum, KeyArray *ka,
|
|||||||
*
|
*
|
||||||
* This can be called concurrently by multiple backends, so it must cope.
|
* This can be called concurrently by multiple backends, so it must cope.
|
||||||
* On first glance it looks completely not concurrent-safe and not crash-safe
|
* On first glance it looks completely not concurrent-safe and not crash-safe
|
||||||
* either. The reason it's okay is that multiple insertion of the same entry
|
* either. The reason it's okay is that multiple insertion of the same entry
|
||||||
* is detected and treated as a no-op by gininsert.c. If we crash after
|
* is detected and treated as a no-op by gininsert.c. If we crash after
|
||||||
* posting entries to the main index and before removing them from the
|
* posting entries to the main index and before removing them from the
|
||||||
* pending list, it's okay because when we redo the posting later on, nothing
|
* pending list, it's okay because when we redo the posting later on, nothing
|
||||||
@ -761,7 +761,7 @@ ginInsertCleanup(GinState *ginstate,
|
|||||||
LockBuffer(metabuffer, GIN_UNLOCK);
|
LockBuffer(metabuffer, GIN_UNLOCK);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize. All temporary space will be in opCtx
|
* Initialize. All temporary space will be in opCtx
|
||||||
*/
|
*/
|
||||||
opCtx = AllocSetContextCreate(CurrentMemoryContext,
|
opCtx = AllocSetContextCreate(CurrentMemoryContext,
|
||||||
"GIN insert cleanup temporary context",
|
"GIN insert cleanup temporary context",
|
||||||
@ -855,7 +855,7 @@ ginInsertCleanup(GinState *ginstate,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* While we left the page unlocked, more stuff might have gotten
|
* While we left the page unlocked, more stuff might have gotten
|
||||||
* added to it. If so, process those entries immediately. There
|
* added to it. If so, process those entries immediately. There
|
||||||
* shouldn't be very many, so we don't worry about the fact that
|
* shouldn't be very many, so we don't worry about the fact that
|
||||||
* we're doing this with exclusive lock. Insertion algorithm
|
* we're doing this with exclusive lock. Insertion algorithm
|
||||||
* guarantees that inserted row(s) will not continue on next page.
|
* guarantees that inserted row(s) will not continue on next page.
|
||||||
|
@ -164,7 +164,7 @@ scanPostingTree(Relation index, GinScanEntry scanEntry,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Collects TIDs into scanEntry->matchBitmap for all heap tuples that
|
* Collects TIDs into scanEntry->matchBitmap for all heap tuples that
|
||||||
* match the search entry. This supports three different match modes:
|
* match the search entry. This supports three different match modes:
|
||||||
*
|
*
|
||||||
* 1. Partial-match support: scan from current point until the
|
* 1. Partial-match support: scan from current point until the
|
||||||
* comparePartialFn says we're done.
|
* comparePartialFn says we're done.
|
||||||
@ -260,7 +260,7 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
|
|||||||
/*
|
/*
|
||||||
* In ALL mode, we are not interested in null items, so we can
|
* In ALL mode, we are not interested in null items, so we can
|
||||||
* stop if we get to a null-item placeholder (which will be the
|
* stop if we get to a null-item placeholder (which will be the
|
||||||
* last entry for a given attnum). We do want to include NULL_KEY
|
* last entry for a given attnum). We do want to include NULL_KEY
|
||||||
* and EMPTY_ITEM entries, though.
|
* and EMPTY_ITEM entries, though.
|
||||||
*/
|
*/
|
||||||
if (icategory == GIN_CAT_NULL_ITEM)
|
if (icategory == GIN_CAT_NULL_ITEM)
|
||||||
@ -956,14 +956,14 @@ scanGetItem(IndexScanDesc scan, ItemPointer advancePast,
|
|||||||
* that exact TID, or a lossy reference to the same page.
|
* that exact TID, or a lossy reference to the same page.
|
||||||
*
|
*
|
||||||
* This logic works only if a keyGetItem stream can never contain both
|
* This logic works only if a keyGetItem stream can never contain both
|
||||||
* exact and lossy pointers for the same page. Else we could have a
|
* exact and lossy pointers for the same page. Else we could have a
|
||||||
* case like
|
* case like
|
||||||
*
|
*
|
||||||
* stream 1 stream 2
|
* stream 1 stream 2
|
||||||
* ... ...
|
* ... ...
|
||||||
* 42/6 42/7
|
* 42/6 42/7
|
||||||
* 50/1 42/0xffff
|
* 50/1 42/0xffff
|
||||||
* ... ...
|
* ... ...
|
||||||
*
|
*
|
||||||
* We would conclude that 42/6 is not a match and advance stream 1,
|
* We would conclude that 42/6 is not a match and advance stream 1,
|
||||||
* thus never detecting the match to the lossy pointer in stream 2.
|
* thus never detecting the match to the lossy pointer in stream 2.
|
||||||
@ -992,7 +992,7 @@ scanGetItem(IndexScanDesc scan, ItemPointer advancePast,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* No hit. Update myAdvancePast to this TID, so that on the next pass
|
* No hit. Update myAdvancePast to this TID, so that on the next pass
|
||||||
* we'll move to the next possible entry.
|
* we'll move to the next possible entry.
|
||||||
*/
|
*/
|
||||||
myAdvancePast = *item;
|
myAdvancePast = *item;
|
||||||
@ -1508,10 +1508,10 @@ gingetbitmap(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* First, scan the pending list and collect any matching entries into the
|
* First, scan the pending list and collect any matching entries into the
|
||||||
* bitmap. After we scan a pending item, some other backend could post it
|
* bitmap. After we scan a pending item, some other backend could post it
|
||||||
* into the main index, and so we might visit it a second time during the
|
* into the main index, and so we might visit it a second time during the
|
||||||
* main scan. This is okay because we'll just re-set the same bit in the
|
* main scan. This is okay because we'll just re-set the same bit in the
|
||||||
* bitmap. (The possibility of duplicate visits is a major reason why GIN
|
* bitmap. (The possibility of duplicate visits is a major reason why GIN
|
||||||
* can't support the amgettuple API, however.) Note that it would not do
|
* can't support the amgettuple API, however.) Note that it would not do
|
||||||
* to scan the main index before the pending list, since concurrent
|
* to scan the main index before the pending list, since concurrent
|
||||||
* cleanup could then make us miss entries entirely.
|
* cleanup could then make us miss entries entirely.
|
||||||
|
@ -98,7 +98,7 @@ createPostingTree(Relation index, ItemPointerData *items, uint32 nitems)
|
|||||||
* Adds array of item pointers to tuple's posting list, or
|
* Adds array of item pointers to tuple's posting list, or
|
||||||
* creates posting tree and tuple pointing to tree in case
|
* creates posting tree and tuple pointing to tree in case
|
||||||
* of not enough space. Max size of tuple is defined in
|
* of not enough space. Max size of tuple is defined in
|
||||||
* GinFormTuple(). Returns a new, modified index tuple.
|
* GinFormTuple(). Returns a new, modified index tuple.
|
||||||
* items[] must be in sorted order with no duplicates.
|
* items[] must be in sorted order with no duplicates.
|
||||||
*/
|
*/
|
||||||
static IndexTuple
|
static IndexTuple
|
||||||
|
@ -387,7 +387,7 @@ ginNewScanKey(IndexScanDesc scan)
|
|||||||
/*
|
/*
|
||||||
* If the index is version 0, it may be missing null and placeholder
|
* If the index is version 0, it may be missing null and placeholder
|
||||||
* entries, which would render searches for nulls and full-index scans
|
* entries, which would render searches for nulls and full-index scans
|
||||||
* unreliable. Throw an error if so.
|
* unreliable. Throw an error if so.
|
||||||
*/
|
*/
|
||||||
if (hasNullQuery && !so->isVoidRes)
|
if (hasNullQuery && !so->isVoidRes)
|
||||||
{
|
{
|
||||||
|
@ -436,7 +436,7 @@ ginExtractEntries(GinState *ginstate, OffsetNumber attnum,
|
|||||||
* If there's more than one key, sort and unique-ify.
|
* If there's more than one key, sort and unique-ify.
|
||||||
*
|
*
|
||||||
* XXX Using qsort here is notationally painful, and the overhead is
|
* XXX Using qsort here is notationally painful, and the overhead is
|
||||||
* pretty bad too. For small numbers of keys it'd likely be better to use
|
* pretty bad too. For small numbers of keys it'd likely be better to use
|
||||||
* a simple insertion sort.
|
* a simple insertion sort.
|
||||||
*/
|
*/
|
||||||
if (*nentries > 1)
|
if (*nentries > 1)
|
||||||
|
@ -675,7 +675,7 @@ ginRedoDeleteListPages(XLogRecPtr lsn, XLogRecord *record)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* In normal operation, shiftList() takes exclusive lock on all the
|
* In normal operation, shiftList() takes exclusive lock on all the
|
||||||
* pages-to-be-deleted simultaneously. During replay, however, it should
|
* pages-to-be-deleted simultaneously. During replay, however, it should
|
||||||
* be all right to lock them one at a time. This is dependent on the fact
|
* be all right to lock them one at a time. This is dependent on the fact
|
||||||
* that we are deleting pages from the head of the list, and that readers
|
* that we are deleting pages from the head of the list, and that readers
|
||||||
* share-lock the next page before releasing the one they are on. So we
|
* share-lock the next page before releasing the one they are on. So we
|
||||||
|
@ -1382,7 +1382,7 @@ initGISTstate(Relation index)
|
|||||||
/*
|
/*
|
||||||
* If the index column has a specified collation, we should honor that
|
* If the index column has a specified collation, we should honor that
|
||||||
* while doing comparisons. However, we may have a collatable storage
|
* while doing comparisons. However, we may have a collatable storage
|
||||||
* type for a noncollatable indexed data type. If there's no index
|
* type for a noncollatable indexed data type. If there's no index
|
||||||
* collation then specify default collation in case the support
|
* collation then specify default collation in case the support
|
||||||
* functions need collation. This is harmless if the support
|
* functions need collation. This is harmless if the support
|
||||||
* functions don't care about collation, so we just do it
|
* functions don't care about collation, so we just do it
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user