pg_shard icon indicating copy to clipboard operation
pg_shard copied to clipboard

Support RETURNING in modification commands

Open digi604 opened this issue 9 years ago • 3 comments

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?

digi604 avatar Jul 23 '15 15:07 digi604

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:

jasonmp85 avatar Jul 27 '15 19:07 jasonmp85

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:

rodo avatar Aug 09 '15 17:08 rodo

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

digi604 avatar Aug 11 '15 07:08 digi604