SQL state: 42601. Execption handling.

2022-06-07 Thread Ц
Community, is that behavior is explainable ?   create   or   replace   function  dbo.func(result  out   int )  as  $$ begin   result =  1 ;  end ; $$  language  plpgsql; -- 1 -- do  $$ declare v_result  int ; begin      select  p.result  from  dbo.func(d) p  into  v_result; exception   when

SQL state: 42601. Execption handling.

2022-06-07 Thread Ц
Community, is that behavior is explainable ?   I suppose the reason of such behavior in different steps of code parsing, but can`t find any discussions or topics in documentation. Сould someone clarify the situation for sure?   create   or   replace   function  dbo.func(result  out   int )  as  

Re: SQL state: 42601. Execption handling.

2022-06-07 Thread Tom Lane
=?UTF-8?B?0KY=?= writes: > -- 2 -- > do $$ > begin >select p.result from dbo.func() p into v_result; > exception when SQLSTATE '42601' then > raise '42601' ; >when others then > raise 'others' ; > end ; > $$ > > --Exception is not handled. This is th

Re: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?

2022-06-07 Thread Merlin Moncure
On Sat, Jun 4, 2022 at 12:37 AM Tom Lane wrote: > Bryn Llewellyn writes: > > I'm going to try to think like this: > > The number of possible spellings of the names of keys in a JSON object > is some flavor of infinite. So including this in an object: > > "k": null > > really is saying something.

Re: SQL state: 42601. Execption handling.

2022-06-07 Thread Kyotaro Horiguchi
At Tue, 07 Jun 2022 10:36:52 -0400, Tom Lane wrote in > =?UTF-8?B?0KY=?= writes: > > -- 2 -- > > do $$ > > begin > >select p.result from dbo.func() p into v_result; > > exception when SQLSTATE '42601' then > > raise '42601' ; > >when others then > > rai