summaryrefslogtreecommitdiff
path: root/src/bin/psql
diff options
context:
space:
mode:
authorPeter Eisentraut2024-05-16 06:15:35 +0000
committerPeter Eisentraut2024-05-16 06:17:46 +0000
commit8aee330af55d8a759b2b73f5a771d9d34a7b887f (patch)
treeb917e26b4dbc6efa2a1c65124768d98eaf8fc92c /src/bin/psql
parentf6ebb418317a1e84be46e7e7b02a26d8c44984de (diff)
Revert temporal primary keys and foreign keys
This feature set did not handle empty ranges correctly, and it's now too late for PostgreSQL 17 to fix it. The following commits are reverted: 6db4598fcb8 Add stratnum GiST support function 46a0cd4cefb Add temporal PRIMARY KEY and UNIQUE constraints 86232a49a43 Fix comment on gist_stratnum_btree 030e10ff1a3 Rename pg_constraint.conwithoutoverlaps to conperiod a88c800deb6 Use daterange and YMD in without_overlaps tests instead of tsrange. 5577a71fb0c Use half-open interval notation in without_overlaps tests 34768ee3616 Add temporal FOREIGN KEY contraints 482e108cd38 Add test for REPLICA IDENTITY with a temporal key c3db1f30cba doc: clarify PERIOD and WITHOUT OVERLAPS in CREATE TABLE 144c2ce0cc7 Fix ON CONFLICT DO NOTHING/UPDATE for temporal indexes Discussion: https://www.postgresql.org/message-id/d0b64a7a-dfe4-4b84-a906-c7dedfa40a3e@eisentraut.org
Diffstat (limited to 'src/bin/psql')
-rw-r--r--src/bin/psql/describe.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 3af44acef1d..f67bf0b8925 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2383,10 +2383,6 @@ describeOneTableDetails(const char *schemaname,
else
appendPQExpBufferStr(&buf, ", false AS indisreplident");
appendPQExpBufferStr(&buf, ", c2.reltablespace");
- if (pset.sversion >= 170000)
- appendPQExpBufferStr(&buf, ", con.conperiod");
- else
- appendPQExpBufferStr(&buf, ", false AS conperiod");
appendPQExpBuffer(&buf,
"\nFROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_index i\n"
" LEFT JOIN pg_catalog.pg_constraint con ON (conrelid = i.indrelid AND conindid = i.indexrelid AND contype IN ('p','u','x'))\n"
@@ -2408,12 +2404,8 @@ describeOneTableDetails(const char *schemaname,
printfPQExpBuffer(&buf, " \"%s\"",
PQgetvalue(result, i, 0));
- /*
- * If exclusion constraint or PK/UNIQUE constraint WITHOUT
- * OVERLAPS, print the constraintdef
- */
- if (strcmp(PQgetvalue(result, i, 7), "x") == 0 ||
- strcmp(PQgetvalue(result, i, 12), "t") == 0)
+ /* If exclusion constraint, print the constraintdef */
+ if (strcmp(PQgetvalue(result, i, 7), "x") == 0)
{
appendPQExpBuffer(&buf, " %s",
PQgetvalue(result, i, 6));