Use go embed to load queries from static files (#607)

This commit is contained in:
Dan Sosedoff
2022-12-06 17:41:46 -06:00
committed by GitHub
parent f4b3091666
commit f48cc5f007
15 changed files with 247 additions and 243 deletions

View File

@@ -0,0 +1,14 @@
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
ORDER BY
contype DESC