mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 10:56:10 +02:00
Fix column names quoting in reset-all-sequences.
The other user-provided names (schema and table) were already quoted using the quote_ident() PostgreSQL functio, but the column name (attname in the catalogs) were not. Blind attempt to fix #425.
This commit is contained in:
parent
3109ba14dc
commit
7daee9405f
@ -485,7 +485,7 @@ BEGIN
|
||||
|| trim(trailing ')'
|
||||
from replace(pg_get_expr(d.adbin, d.adrelid),
|
||||
'nextval', 'setval'))
|
||||
|| ', (select greatest(max(' || a.attname || '), 1) from only '
|
||||
|| ', (select greatest(max(' || quote_ident(a.attname) || '), 1) from only '
|
||||
|| quote_ident(nspname) || '.' || quote_ident(relname) || '));' as sql
|
||||
FROM pg_class c
|
||||
JOIN pg_namespace n on n.oid = c.relnamespace
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user