citusdata / pg_shard

ATTENTION: pg_shard is superseded by Citus, its more powerful replacement
https://github.com/citusdata/citus
GNU Lesser General Public License v3.0
1.06k stars 63 forks source link

sync-metadata does not support quoted column names #129

Closed digi604 closed 9 years ago

digi604 commented 9 years ago
CREATE TABLE import_log (
    id integer NOT NULL,
    name character varying(20) NOT NULL,
    success boolean NOT NULL,
    "time" timestamp without time zone NOT NULL,
    count integer NOT NULL,
    first_id bigint NOT NULL,
    last_id bigint,
    duration real,
    "end" timestamp without time zone
);

fails with:

sync-metadata import_log
sync_table_metadata_to_citus
------------------------------

(1 row)

ERROR:  syntax error at or near "end"
LINE 10:     end timestamp without time zone  NULL);
             ^
jasonmp85 commented 9 years ago

A quick workaround would be to rename your column to something that is not a keyword. Perhaps end_date or end_time would work.

sync-metadata is part of the proof of concept demoed by @marcocitus during PGDay UK 2015 as documented in this blog post. The demo is impressive and we're glad to see your interest in it! We all have multi-master support on our minds and are hard at work figuring out how to productize this kind of functionality in a future pg_shard release.

At the moment, we can't offer support for these scripts: they're not part of pg_shard proper but rather were written to demonstrate the neat things you can build with our extension. I'm going to close this ticket for now. @marcocitus may be moving some of his CloudFormation work into a separate GitHub repository in the future, at which point we can start accumulating issues there (I'll remind him of this issue when that day comes).