PostgreSQL: Issue with passing array to procedure

后端 未结 2 1582
悲哀的现实
悲哀的现实 2020-12-22 08:46

I have a type as:

CREATE TYPE status_record AS
   (
   id bigint,
   status boolean
   );

A procedure that does some processing with an arr

2条回答
  •  既然无缘
    2020-12-22 09:51

    Try to put the array and type initialization into a string, maybe you can then get around the problems with the obfuscation layer (aka ORM):

    select update_status(cast('{"(1,true)", "(2,false)"}' as status_record[]));
    

    I don't know Hibernate, so I can't tell if that will work.

提交回复
热议问题