mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-10 00:07:00 +02:00
Fix catalog merge hasards.
When reading table names from PostgreSQL, we might find some that need systematic quoting (such as names that begin with a digit). In that case, when later comparing the catalogs to match source database table names against PostgreSQL catalog table names, we need to unquote the PostgreSQL table name we are using. In passing, force the *identifier-case* to :none when reading object names from the PostgreSQL catalogs.
This commit is contained in:
parent
96b2af6b2a
commit
5fd1e9f3aa
@ -37,7 +37,8 @@
|
||||
|
||||
(loop :for source-table :in (schema-table-list source-schema)
|
||||
:for target-table := (find-table target-schema
|
||||
(table-name source-table))
|
||||
(ensure-unquoted
|
||||
(table-name source-table)))
|
||||
:do (if target-table
|
||||
(progn
|
||||
;; re-use indexes and fkeys from target-catalog
|
||||
|
@ -8,7 +8,8 @@
|
||||
&key table source-catalog including excluding)
|
||||
"Fetch PostgreSQL catalogs for the target database. A PostgreSQL
|
||||
connection must be opened."
|
||||
(let* ((catalog (make-catalog :name dbname))
|
||||
(let* ((*identifier-case* :none)
|
||||
(catalog (make-catalog :name dbname))
|
||||
(including (cond ((and table (not including))
|
||||
(make-including-expr-from-table table))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user