Re: Data loss when '"json_populate_recorset" with long column name

2021-09-07 Thread Julien Rouhaud
On Tue, Sep 7, 2021 at 10:08 PM Tom Lane wrote: > > Julien Rouhaud writes: > > > Yes, but even if we eventually fix that my impression is that we would > > still enforce a limit of 128 characters (or bytes) as this is the SQL > > specification. > > Probably not. I think SQL says that's the minim

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-07 Thread Gavin Flower
On 8/09/21 2:08 am, Tom Lane wrote: Julien Rouhaud writes: On Tue, Sep 7, 2021 at 1:31 PM Michael Paquier wrote: Yeah. We should try to work toward removing the limits on NAMEDATALEN for the attribute names. Easier said than done :) Yes, but even if we eventually fix that my impression is

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-07 Thread Tom Lane
Julien Rouhaud writes: > On Tue, Sep 7, 2021 at 1:31 PM Michael Paquier wrote: >> Yeah. We should try to work toward removing the limits on NAMEDATALEN >> for the attribute names. Easier said than done :) > Yes, but even if we eventually fix that my impression is that we would > still enforce

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-06 Thread Julien Rouhaud
On Tue, Sep 7, 2021 at 1:31 PM Michael Paquier wrote: > > Yeah. We should try to work toward removing the limits on NAMEDATALEN > for the attribute names. Easier said than done :) Yes, but even if we eventually fix that my impression is that we would still enforce a limit of 128 characters (or

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-06 Thread Michael Paquier
On Tue, Sep 07, 2021 at 01:11:49PM +0800, Julien Rouhaud wrote: > Yes, that's because json identifiers have different rules from > relation identifiers. Your only option here is to use the real / > truncated identifier. Also I don't think it would be a good thing to > add a way to truncate identi

Re: Data loss when '"json_populate_recorset" with long column name

2021-09-06 Thread Julien Rouhaud
On Tue, Sep 7, 2021 at 11:27 AM Денис Романенко wrote: > > If we create a column name longer than 64 bytes, it will be truncated in > PostgreSQL to max (NAMEDATALEN) length. > > For example: > "VeryLongNameVeryLongNameVeryLongNameVeryLongNameVeryLongNameVeryLongName" > will be truncated in data