Merge pull request #1129 from amatsuda/pgsql_schema_query_format
on.upcase!
This commit is contained in:
commit
3a5a378056
@ -821,7 +821,7 @@ def pk_and_sequence_for(table) #:nodoc:
|
||||
result = exec_query(<<-end_sql, 'SCHEMA').rows.first
|
||||
SELECT attr.attname, seq.relname
|
||||
FROM pg_class seq
|
||||
INNER JOIN pg_depend dep on seq.oid = dep.objid
|
||||
INNER JOIN pg_depend dep ON seq.oid = dep.objid
|
||||
INNER JOIN pg_attribute attr ON attr.attrelid = dep.refobjid AND attr.attnum = dep.refobjsubid
|
||||
INNER JOIN pg_constraint cons ON attr.attrelid = cons.conrelid AND attr.attnum = cons.conkey[1]
|
||||
WHERE seq.relkind = 'S'
|
||||
|
Loading…
Reference in New Issue
Block a user