mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 10:56:10 +02:00
Citus support small bug fixes.
When calling the create_distributed_table() function, the column name is given as a literal parameter to the function and should be quoted that way, with single quotes. In particular, if our column-name is already double-quoted, we need to get rid of those extra quotes. Also, the source-table-name might be a cons object when qualified, or a plain string when not schema-qualified. Adjust the citus-find-table code to take that into account.
This commit is contained in:
parent
2e6a941d25
commit
7c146c46b9
@ -17,4 +17,4 @@
|
||||
(rule-col-name (column-name (citus-distributed-rule-using rule))))
|
||||
(format stream "SELECT create_distributed_table('~a', '~a');"
|
||||
(format-table-name rule-table)
|
||||
(apply-identifier-case rule-col-name))))
|
||||
(ensure-unquoted rule-col-name))))
|
||||
|
||||
@ -70,7 +70,10 @@
|
||||
table-name schema-name))))))
|
||||
|
||||
(defun citus-find-table (catalog table)
|
||||
(let* ((table-name (cdr (table-source-name table)))
|
||||
(let* ((source-name (table-source-name table))
|
||||
(table-name (etypecase source-name
|
||||
(string source-name)
|
||||
(cons (cdr source-name))))
|
||||
(schema-name (schema-name (table-schema table))))
|
||||
(or (find-table (find-schema catalog schema-name) table-name)
|
||||
(error (make-condition 'citus-rule-table-not-found
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user