postgresql/src/backend/utils/adt
Alvaro Herrera 87259588d0 Fix tablespace inheritance for partitioned rels
Commit ca4103025d left a few loose ends.  The most important one
(broken pg_dump output) is already fixed by virtue of commit
3b23552ad8, but some things remained:

* When ALTER TABLE rewrites tables, the indexes must remain in the
  tablespace they were originally in.  This didn't work because
  index recreation during ALTER TABLE runs manufactured SQL (yuck),
  which runs afoul of default_tablespace in competition with the parent
  relation tablespace.  To fix, reset default_tablespace to the empty
  string temporarily, and add the TABLESPACE clause as appropriate.

* Setting a partitioned rel's tablespace to the database default is
  confusing; if it worked, it would direct the partitions to that
  tablespace regardless of default_tablespace.  But in reality it does
  not work, and making it work is a larger project.  Therefore, throw
  an error when this condition is detected, to alert the unwary.

Add some docs and tests, too.

Author: Álvaro Herrera
Discussion: https://postgr.es/m/CAKJS1f_1c260nOt_vBJ067AZ3JXptXVRohDVMLEBmudX1YEx-A@mail.gmail.com
2019-04-25 10:31:32 -04:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
amutils.c Report progress of CREATE INDEX operations 2019-04-02 15:18:08 -03:00
array_expanded.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
array_selfuncs.c Refactor planner's header files. 2019-01-29 15:48:51 -05:00
array_typanalyze.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
array_userfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
arrayfuncs.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
arrayutils.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
ascii.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
bool.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
cash.c Correct constness of a few variables. 2018-10-15 21:01:14 -07:00
char.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
cryptohashes.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
date.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
datetime.c Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
datum.c Fix optimization of foreign-key on update actions 2019-03-18 17:19:21 +01:00
dbsize.c Replace heapam.h includes with {table, relation}.h where applicable. 2019-01-21 10:51:37 -08:00
domains.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
encode.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
enum.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
expandeddatum.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
expandedrecord.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
float.c Numeric error suppression in jsonpath 2019-03-16 12:21:19 +03:00
format_type.c Remove unused macro 2019-02-11 10:07:25 +01:00
formatting.c Unify error messages 2019-04-24 09:26:13 -04:00
genfile.c Unify error messages 2019-04-24 09:26:13 -04:00
geo_ops.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
geo_selfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
geo_spgist.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
inet_cidr_ntop.c
inet_net_pton.c
int8.c Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
int.c Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
json.c Unify error messages 2019-04-24 09:26:13 -04:00
jsonb_gin.c GIN support for @@ and @? jsonpath operators 2019-04-01 18:08:52 +03:00
jsonb_op.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
jsonb_util.c Partial implementation of SQL/JSON path language 2019-03-16 12:16:48 +03:00
jsonb.c Unify error messages 2019-04-24 09:26:13 -04:00
jsonfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
jsonpath_exec.c Throw error in jsonb_path_match() when result is not single boolean 2019-04-01 18:09:20 +03:00
jsonpath_gram.y Cosmetic changes for jsonpath_gram.y and jsonpath_scan.l 2019-03-25 15:42:51 +03:00
jsonpath_scan.l Minor jsonpath fixes. 2019-04-17 13:37:00 -04:00
jsonpath.c Suppress -Wimplicit-fallthrough warnings in new jsonpath code. 2019-03-16 12:34:46 -04:00
levenshtein.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
like_match.c Add some const decorations 2019-02-08 10:13:24 +01:00
like_support.c Unbreak index optimization for LIKE on bytea 2019-04-15 09:29:17 +02:00
like.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
lockfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
mac8.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
mac.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
Makefile Minor jsonpath fixes. 2019-04-17 13:37:00 -04:00
misc.c Replace uses of heap_open et al with the corresponding table_* function. 2019-01-21 10:51:37 -08:00
name.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
network_gist.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
network_selfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
network_spgist.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
network.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
numeric.c Numeric error suppression in jsonpath 2019-03-16 12:21:19 +03:00
numutils.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
oid.c Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
oracle_compat.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
orderedsetaggs.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
partitionfuncs.c Fix crash with pg_partition_root 2019-03-22 17:27:38 +09:00
pg_locale.c Repair assorted issues in locale data extraction. 2019-04-23 18:51:30 -04:00
pg_lsn.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
pg_upgrade_support.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgstatfuncs.c Return NULL for checksum failures if checksums are not enabled 2019-04-17 13:51:48 +02:00
pseudotypes.c tableam: introduce table AM infrastructure. 2019-03-06 09:54:38 -08:00
quote.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
rangetypes_gist.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
rangetypes_selfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
rangetypes_spgist.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
rangetypes_typanalyze.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
rangetypes.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
regexp.c Partial implementation of SQL/JSON path language 2019-03-16 12:16:48 +03:00
regproc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
ri_triggers.c Support foreign keys that reference partitioned tables 2019-04-03 14:40:21 -03:00
rowtypes.c Fix optimization of foreign-key on update actions 2019-03-18 17:19:21 +01:00
ruleutils.c Fix tablespace inheritance for partitioned rels 2019-04-25 10:31:32 -04:00
selfuncs.c Make queries' locking of indexes more consistent. 2019-04-04 15:12:58 -04:00
tid.c tableam: Add table_get_latest_tid, to wrap heap_get_latest_tid. 2019-03-25 17:14:48 -07:00
timestamp.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
trigfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsginidx.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsgistidx.c Make use of compiler builtins and/or assembly for CLZ, CTZ, POPCNT. 2019-02-15 23:22:33 -05:00
tsquery_cleanup.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsquery_gist.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsquery_op.c Fix misplaced const 2019-03-26 09:23:08 +01:00
tsquery_rewrite.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsquery_util.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsquery.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsrank.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsvector_op.c Remove unused macro 2019-03-11 09:29:50 +01:00
tsvector_parser.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsvector.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
txid.c Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00
uuid.c Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
varbit.c Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
varchar.c Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
varlena.c Add support for partial TOAST decompression 2019-04-02 12:35:32 -04:00
version.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
windowfuncs.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
xid.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
xml.c Don't request pretty-printed output from xmlNodeDump(). 2019-04-23 10:51:07 -04:00