Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Tom Lane
Amit Langote writes: > On Fri, Apr 5, 2024 at 11:56 AM Tom Lane wrote: >> Consistency with what? There are plenty of other gram.y productions >> that throw FEATURE_NOT_SUPPORTED conditionally. > Ah, yes, I see. I thought maybe not when I read "unconventional use > of" in your first email. Tha

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Amit Langote
On Fri, Apr 5, 2024 at 11:56 AM Tom Lane wrote: > Amit Langote writes: > > Wonder if, for consistency, I should change the coding so that the > > FEATURE_NOT_SUPPORTED is reported in transformJsonTable() or > > something? > > Consistency with what? There are plenty of other gram.y productions >

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Tom Lane
Amit Langote writes: > Wonder if, for consistency, I should change the coding so that the > FEATURE_NOT_SUPPORTED is reported in transformJsonTable() or > something? Consistency with what? There are plenty of other gram.y productions that throw FEATURE_NOT_SUPPORTED conditionally.

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Amit Langote
On Fri, Apr 5, 2024 at 1:55 AM Tom Lane wrote: > I wrote: > > We need to either nuke that ecpg warning entirely, or find a more > > robust way of detecting whether the gram.y complaint is conditional. > > I'll put a brown paper bag on my head before suggesting that maybe > > we could pay attention

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Tom Lane
I wrote: > We need to either nuke that ecpg warning entirely, or find a more > robust way of detecting whether the gram.y complaint is conditional. > I'll put a brown paper bag on my head before suggesting that maybe > we could pay attention to how far the errcode is indented. Perhaps > a slightly

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Tom Lane
I wrote: > Looking at parse.pl, I guess it's probably triggered by some > unconventional use of ERRCODE_FEATURE_NOT_SUPPORTED in your > gram.y changes. Oh, no, it's parse.pl that is at fault. It's doing this: if (/ERRCODE_FEATURE_NOT_SUPPORTED/) { $feature_not_support

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Tom Lane
Andrew Dunstan writes: > On 2024-04-04 Th 09:20, Amit Langote wrote: >> I don't get that WARNING here, but I remember seeing it at one point, >> which I am supposed to have fixed. >> >> Can you please share more details about where you're seeing it? > It's with a meson build: I see it with auto

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Andrew Dunstan
On 2024-04-04 Th 09:20, Amit Langote wrote: Hi Andrew, On Thu, Apr 4, 2024 at 10:06 PM Andrew Dunstan wrote: On 2024-04-04 Th 07:21, Amit Langote wrote: Add basic JSON_TABLE() functionality Excellent! But I am getting this: ../../../src/interfaces/ecpg/test/sql/sqljson_jsontable.pgc:23:

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Amit Langote
Hi Andrew, On Thu, Apr 4, 2024 at 10:06 PM Andrew Dunstan wrote: > On 2024-04-04 Th 07:21, Amit Langote wrote: > > Add basic JSON_TABLE() functionality > > > Excellent! > > But I am getting this: > > ../../../src/interfaces/ecpg/test/sql/sqljson_jsontable.pgc:23: WARNING: > unsupported feature w

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Amit Langote
Hi Erik On Thu, Apr 4, 2024 at 9:30 PM Erik Rijkers wrote: > Op 4/4/24 om 13:21 schreef Amit Langote: > > Add basic JSON_TABLE() functionality > > > > Great that it's now committed. Congrats! > > > There is one 'uninitialized' muttering during compile (gcc 13.2.0): > > In function ‘transformJsonF

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Andrew Dunstan
On 2024-04-04 Th 07:21, Amit Langote wrote: Add basic JSON_TABLE() functionality Excellent! But I am getting this: ../../../src/interfaces/ecpg/test/sql/sqljson_jsontable.pgc:23: WARNING: unsupported feature will be passed to server Is that intended? cheers andrew -- Andrew Dunstan

Re: pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Erik Rijkers
Op 4/4/24 om 13:21 schreef Amit Langote: Add basic JSON_TABLE() functionality Great that it's now committed. Congrats! There is one 'uninitialized' muttering during compile (gcc 13.2.0): In function ‘transformJsonFuncExpr’, inlined from ‘transformExprRecurse’ at parse_expr.c:373:13: par

pgsql: Add basic JSON_TABLE() functionality

2024-04-04 Thread Amit Langote
Add basic JSON_TABLE() functionality JSON_TABLE() allows JSON data to be converted into a relational view and thus used, for example, in a FROM clause, like other tabular data. Data to show in the view is selected from a source JSON object using a JSON path expression to get a sequence of JSON ob