psql_constraints.patch
application/octet-stream
Filename: psql_constraints.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/bin/psql/describe.c | 0 | 0 |
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 67a2b47..a6ee4ab 100644
*** a/src/bin/psql/describe.c
--- b/src/bin/psql/describe.c
*************** describeOneTableDetails(const char *sche
*** 1591,1598 ****
/* Label as primary key or unique (but not both) */
if (strcmp(PQgetvalue(result, i, 1), "t") == 0)
appendPQExpBuffer(&buf, " PRIMARY KEY,");
! else if (strcmp(PQgetvalue(result, i, 2), "t") == 0)
! appendPQExpBuffer(&buf, " UNIQUE,");
/* Everything after "USING" is echoed verbatim */
indexdef = PQgetvalue(result, i, 5);
--- 1591,1602 ----
/* Label as primary key or unique (but not both) */
if (strcmp(PQgetvalue(result, i, 1), "t") == 0)
appendPQExpBuffer(&buf, " PRIMARY KEY,");
! else if (strcmp(PQgetvalue(result, i, 2), "t") == 0) {
! if (verbose && strcmp(PQgetvalue(result, i, 7), "u") == 0)
! appendPQExpBuffer(&buf, " UNIQUE CONSTRAINT,");
! else
! appendPQExpBuffer(&buf, " UNIQUE,");
! }
/* Everything after "USING" is echoed verbatim */
indexdef = PQgetvalue(result, i, 5);