postgresql/src/backend/utils/adt
Tom Lane 7b8b8a4331 Improve representation of PlanRowMark.
This patch fixes two inadequacies of the PlanRowMark representation.

First, that the original LockingClauseStrength isn't stored (and cannot be
inferred for foreign tables, which always get ROW_MARK_COPY).  Since some
PlanRowMarks are created out of whole cloth and don't actually have an
ancestral RowMarkClause, this requires adding a dummy LCS_NONE value to
enum LockingClauseStrength, which is fairly annoying but the alternatives
seem worse.  This fix allows getting rid of the use of get_parse_rowmark()
in FDWs (as per the discussion around commits 462bd95705 and
8ec8760fc8), and it simplifies some things elsewhere.

Second, that the representation assumed that all child tables in an
inheritance hierarchy would use the same RowMarkType.  That's true today
but will soon not be true.  We add an "allMarkTypes" field that identifies
the union of mark types used in all a parent table's children, and use
that where appropriate (currently, only in preprocess_targetlist()).

In passing fix a couple of minor infelicities left over from the SKIP
LOCKED patch, notably that _outPlanRowMark still thought waitPolicy
is a bool.

Catversion bump is required because the numeric values of enum
LockingClauseStrength can appear in on-disk rules.

Extracted from a much larger patch to support foreign table inheritance;
it seemed worth breaking this out, since it's a separable concern.

Shigeru Hanada and Etsuro Fujita, somewhat modified by me
2015-03-15 18:41:47 -04:00
..
acl.c Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
array_selfuncs.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
array_typanalyze.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
array_userfuncs.c Fix over-optimistic caching in fetch_array_arg_replace_nulls(). 2015-02-25 14:19:13 -05:00
arrayfuncs.c In array_agg(), don't create a new context for every group. 2015-02-21 17:24:48 -08:00
arrayutils.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
ascii.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
bool.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
cash.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
char.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
date.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
datetime.c Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
datum.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
dbsize.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
domains.c Use the typcache to cache constraints for domain types. 2015-03-01 14:06:55 -05:00
encode.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
enum.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
float.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
format_type.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
formatting.c Check DCH_MAX_ITEM_SIZ limits with <=, not <. 2015-02-06 23:39:52 -05:00
genfile.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
geo_ops.c Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
geo_selfuncs.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
inet_cidr_ntop.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
inet_net_pton.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
int8.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
int.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
json.c Render infinite date/timestamps as 'infinity' for json/jsonb 2015-02-26 12:25:21 -05:00
jsonb_gin.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
jsonb_op.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
jsonb_util.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
jsonb.c Suppress uninitialized-variable warning from less-bright compilers. 2015-02-27 18:19:22 -05:00
jsonfuncs.c Use FLEXIBLE_ARRAY_MEMBER in struct RecordIOData. 2015-02-20 17:03:12 -05:00
levenshtein.c Suggest to the user the column they may have meant to reference. 2015-03-11 10:44:04 -04:00
like_match.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
like.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
lockfuncs.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
mac.c Allow input format xxxx-xxxx-xxxx for macaddr type 2014-10-21 16:16:39 -04:00
Makefile Move pg_lzcompress.c to src/common. 2015-02-09 15:15:24 +09:00
misc.c Add a default local latch for use in signal handlers. 2015-01-14 18:45:22 +01:00
nabstime.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
name.c Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
network_gist.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
network_selfuncs.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
network.c Add min and max aggregates for inet/cidr data types. 2014-08-28 22:37:58 -04:00
numeric.c Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
numutils.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
oid.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
oracle_compat.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
orderedsetaggs.c Use abbreviated keys for faster sorting of text datums. 2015-01-19 15:28:27 -05:00
pg_locale.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_lsn.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
pgstatfuncs.c Add pg_stat_get_snapshot_timestamp() to show statistics snapshot timestamp. 2015-02-19 21:36:50 -05:00
pseudotypes.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
quote.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
rangetypes_gist.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
rangetypes_selfuncs.c Fix assorted oversights in range selectivity estimation. 2015-01-30 12:30:59 -05:00
rangetypes_spgist.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
rangetypes_typanalyze.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
rangetypes.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
regexp.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
regproc.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
ri_triggers.c Fix column-privilege leak in error-message paths 2015-01-28 12:31:30 -05:00
rowtypes.c Some more FLEXIBLE_ARRAY_MEMBER hacking. 2015-02-20 02:28:03 -05:00
ruleutils.c Improve representation of PlanRowMark. 2015-03-15 18:41:47 -04:00
selfuncs.c Avoid unused-variable warning in non-assert builds. 2015-03-04 22:00:36 -05:00
tid.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
timestamp.c Add transform functions for AT TIME ZONE. 2015-03-01 13:22:34 -05:00
trigfuncs.c Use FLEXIBLE_ARRAY_MEMBER for HeapTupleHeaderData.t_bits[]. 2015-02-21 15:13:06 -05:00
tsginidx.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsgistidx.c Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
tsquery_cleanup.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsquery_gist.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsquery_op.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsquery_rewrite.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsquery_util.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsquery.c Move pg_crc.c to src/common, and remove pg_crc_tables.h 2015-02-09 11:17:56 +02:00
tsrank.c Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER member. 2015-02-20 17:50:18 -05:00
tsvector_op.c Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
tsvector_parser.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
tsvector.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
txid.c Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
uuid.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
varbit.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
varchar.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
varlena.c Re-enable abbreviated keys on Windows. 2015-01-26 14:28:14 -05:00
version.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
windowfuncs.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
xid.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
xml.c In array_agg(), don't create a new context for every group. 2015-02-21 17:24:48 -08:00