* Run against PostgreSQL 18 * Handle constraints for pg18 * Bump golangci-linter to 1.62.2 (#772) * Bump golangci-linter to 1.62.2 * Address linting warning via change or ignore
16 lines
276 B
SQL
16 lines
276 B
SQL
SELECT
|
|
conname AS name,
|
|
pg_get_constraintdef(c.oid, true) AS definition
|
|
FROM
|
|
pg_constraint c
|
|
JOIN
|
|
pg_namespace n ON n.oid = c.connamespace
|
|
JOIN
|
|
pg_class cl ON cl.oid = c.conrelid
|
|
WHERE
|
|
n.nspname = $1
|
|
AND relname = $2
|
|
AND contype != 'n'
|
|
ORDER BY
|
|
contype DESC
|