Re: Regression in Postgres 17?

From: Achilleas Mantzios <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Regression in Postgres 17?
Date: 2024-10-22 16:02:59
Message-ID: 0e67ba23-2531-4ade-8dce-12873f46601c@cloud.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Στις 22/10/24 18:54, ο/η Colin 't Hart έγραψε:
> Hi,
>
> This works in Postgres 15:
>
> pg15> create function json_test(out value text, out json jsonb)
> returns record
> language sql
> as
> $$
>   select null::text, null::jsonb;
> $$
> ;
> CREATE FUNCTION
> pg15> select * from json_test();
> ┌───────┬──────┐
> │ value │ json │
> ├───────┼──────┤
> │       │      │
> └───────┴──────┘
> (1 row)
>
>
> In Postgres 17 trying to create the function yields an error:
>
> pg17> create function json_test(out value text, out json jsonb)
> returns record
> language sql
> as
> $$
>   select null::text, null::jsonb;
> $$
> ;
> ERROR:  syntax error at or near "jsonb"
> LINE 1: create function json_test(out value text, out json jsonb)
>
>
> Am I doing something wrong? Or is this a regression?

Do this instead :

create function json_test(out value text, out jsonparam jsonb)
returns record
language sql
as
$$
 select null::text, null::jsonb;
$$
;
CREATE FUNCTION

apparently json is a reserved word (now) and won't be accepted as
function parameter name.

>
> Thanks,
>
> Colin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-10-22 16:03:05 Re: Regression in Postgres 17?
Previous Message Jeff Ross 2024-10-22 16:00:17 Re: Query performance issue