Skip to content

Commit

Permalink
correct function to get primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbucci committed Feb 22, 2024
1 parent fb2c3a0 commit 2aaf030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pg4wp/driver_pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ function get_primary_key_for_table(&$connection, $table)
FROM pg_index i
JOIN pg_attribute a ON a.attrelid = i.indrelid
AND a.attnum = ANY(i.indkey)
WHERE i.indrelid = 'tablename'::regclass
WHERE i.indrelid = '$table'::regclass
AND i.indisprimary
SQL;

Expand Down

0 comments on commit 2aaf030

Please sign in to comment.