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

Support RETURNING in modification commands #128

Open digi604 opened 9 years ago

digi604 commented 9 years ago

Any query using the RETURNING clause produces the following error:

NotSupportedError: cannot perform distributed planning for the given query
DETAIL:  RETURNING clauses are not supported in distributed queries.

Can you add support for RETURNING clauses?

jasonmp85 commented 9 years ago

Hey @digi604: What's your use case? We didn't implement RETURNING to keep the feature profile abbreviated during the initial release, but with sufficient demand we could change that. :smiley:

rodo commented 9 years ago

In ORM (I know it's bad, but sometimes we have to work with people who love them) like Django the SQL query include RETURNING to return the object's id to the ORM, maybe @digi604 uses an ORM. I vote for RETURNING support in pg_shard :+1:

digi604 commented 9 years ago

i use peewee (orm) in a rather complex worker queue.