Skip to content

AWS Plugin PKs #7340

@bbernays

Description

@bbernays

Ensure that all tables that have an arn field have the correct PK:

Query
select * from (SELECT i.relname as indname,
       idx.indrelid::regclass,
       ARRAY(
       SELECT pg_get_indexdef(idx.indexrelid, k + 1, true)
       FROM generate_subscripts(idx.indkey, 1) as k
       ORDER BY k
       ) as indkey_names
FROM   pg_index as idx
JOIN   pg_class as i ON     i.oid = idx.indexrelid
join (SELECT column_name,table_name FROM information_schema.columns WHERE table_schema = 'public' and column_name= 'arn') as columns on idx.indrelid::regclass::text = columns.table_name::text
WHERE i.relname like 'aws_%') as k
where '_cq_id' = ANY ( indkey_names ) and indname like '%cqpk';

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions