Fix the PostgreSQL Reset Sequences code.

This commit is contained in:
Dimitri Fontaine 2013-10-06 12:04:37 +02:00
parent 314ee9611a
commit 236c9ffdf5
2 changed files with 3 additions and 2 deletions

View File

@ -572,7 +572,8 @@ order by ordinal_position" dbname table-name)))
(mapcar
(lambda (name) (apply-identifier-case name identifier-case))
only-tables)))
(pgloader.pgsql:reset-all-sequences pg-dbname :only-tables only-tables)))
(log-message :notice "Resetting all sequences")
(pgloader.pgsql:reset-all-sequences pg-dbname :only-tables only-tables)))
;; now end the kernels
(let ((lp:*kernel* idx-kernel)) (lp:end-kernel))

View File

@ -151,7 +151,7 @@ BEGIN
and a.atthasdef
WHERE relkind = 'r' and a.attnum > 0
and pg_get_expr(d.adbin, d.adrelid) ~~ '^nextval'
~@[and c.oid in ~{'~a'::regclass~^, ~}~]
~@[and c.oid in (~{'~a'::regclass~^, ~})~]
LOOP
n := n + 1;
EXECUTE r.sql;