public inbox for [email protected]  
help / color / mirror / Atom feed
From: Colin 't Hart <[email protected]>
To: [email protected]
Subject: Regression in Postgres 17?
Date: Tue, 22 Oct 2024 17:54:29 +0200
Message-ID: <CAMon-aR07TWHZt2QX9QsZQEniyE-6+FdHJSGwyMwvegJSjjNug@mail.gmail.com> (raw)

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?

Thanks,

Colin


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Regression in Postgres 17?
  In-Reply-To: <CAMon-aR07TWHZt2QX9QsZQEniyE-6+FdHJSGwyMwvegJSjjNug@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox