Hi all. Well, it turned out the problem was in the parameter ... the returning 
clause works fine, my bad.

On 2021/07/12 20:20:35, Zoran Regvart <zo...@regvart.com> wrote: 
> Hi Zuzana,
> have you set the `CamelSqlRetrieveGeneratedKeys=true` header? See the
> documentation on that:
> 
> https://camel.apache.org/components/latest/sql-component.html#_generated_keys
> 
> zoran
> 
> On Mon, Jul 12, 2021 at 2:33 PM Zuzana Krenkova <zuzana.krenk...@yoso.fi> 
> wrote:
> >
> > Is it possible to use PostgreSQL insert with returning clause with Camel 
> > sql component? This insert statement works fine on its own (inserting and 
> > also returning id and token), but when used in a Camel route, the insert 
> > gets processed but exchange body is returned empty. Why?
> >
> > INSERT INTO my_table(token) values(:#new_token)
> > ON CONFLICT (token)
> > DO UPDATE SET token=excluded.token returning id, token
> 
> 
> 
> -- 
> Zoran Regvart
> 

Reply via email to