The general way to find out the primary key columns of a table, which should work in any SQL database, is something like:
SELECT column_name
FROM information_schema.table_constraints
JOIN information_schema.key_column_usage
USING (constraint_catalog, constraint_schema, constraint_name,
table_catalog, table_schema, table_name)
WHERE constraint_type = 'PRIMARY KEY'
AND (table_schema, table_name) = ('yourschema', 'yourtable')
ORDER BY ordinal_position;
which returns something like
┌─────────────┐
│ column_name │
├─────────────┤
│ a │
│ b │
└─────────────┘