adminer
adminer copied to clipboard
Remove quote from $sequence_name
Location: adminer/drivers/pgsql.inc.php:786
When $sequence_name has double quote around like ""google-drive_account_id_seq"" then the SQL query is like this:
SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = '"google-drive_account_id_seq"'
The result of the query above return false. And when trying to import SQL file:
Error in query: ERROR: syntax error at or near "MINVALUE"
LINE 1: ...SEQUENCE "google-drive_account_id_seq" INCREMENT MINVALUE ...
The query cause error:
CREATE SEQUENCE "google-drive_account_id_seq" INCREMENT MINVALUE MAXVALUE CACHE ;
The correct query should be:
SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = 'google-drive_account_id_seq'
Merged with a modification to https://github.com/pematon/adminer, thanks.
Fixes also sequence name "hello""hello".
Thanks.