Re: how to concat/concat_ws all fields without braces

2019-06-15 Thread Pavel Stehule
so 15. 6. 2019 v 16:20 odesílatel Jean Louis napsal: > Dear Pavel, > > Ahoj. > > * Pavel Stehule [2019-06-15 11:37]: > > you can write own function that will do what you want > > > > create or replace function rec_concat_fields(record, text) > > returns text as $$ > > begin > > return stri

Re: how to concat/concat_ws all fields without braces

2019-06-15 Thread Jean Louis
Dear Thomas, * Thomas Kellerer [2019-06-15 11:37]: > Jean Louis schrieb am 15.06.2019 um 13:19: > > I have tried doing something like: > > > > SELECT concat_ws(' ', table.*) FROM table; > > > > and if I do that way, it is essentially same as > > > > SELECT concat(table.*) FROM table; > > > >

Re: how to concat/concat_ws all fields without braces

2019-06-15 Thread Jean Louis
Dear Pavel, Ahoj. * Pavel Stehule [2019-06-15 11:37]: > you can write own function that will do what you want > > create or replace function rec_concat_fields(record, text) > returns text as $$ > begin > return string_agg(value, '|') from json_each_text(row_to_json($1)); > end > $$ lang

Re: how to concat/concat_ws all fields without braces

2019-06-15 Thread Pavel Stehule
Hi so 15. 6. 2019 v 8:20 odesílatel Jean Louis napsal: > Hello, > > I have tried doing something like: > > SELECT concat_ws(' ', table.*) FROM table; > > and if I do that way, it is essentially same as > > SELECT concat(table.*) FROM table; > > and I get the items in braces like (1,something). >

Re: how to concat/concat_ws all fields without braces

2019-06-15 Thread Thomas Kellerer
Jean Louis schrieb am 15.06.2019 um 13:19: > I have tried doing something like: > > SELECT concat_ws(' ', table.*) FROM table; > > and if I do that way, it is essentially same as > > SELECT concat(table.*) FROM table; > > and I get the items in braces like (1,something). > > Why do I get it i