Use go embed to load queries from static files (#607)
This commit is contained in:
14
pkg/statements/sql/table_constraints.sql
Normal file
14
pkg/statements/sql/table_constraints.sql
Normal 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
|
||||
Reference in New Issue
Block a user