Postgres Function End Loop and return Error

后端 未结 2 1242
长发绾君心
长发绾君心 2021-01-24 05:57

I have tried to create this function but the system is returning a \"LOOP error\" and I don\'t know how to return 3 variables at the same time. I\'ve tried hard to figure this o

2条回答
  •  甜味超标
    2021-01-24 06:54

    To return multiple values at the same time, you'll want to specify OUT parameters and change the return type of the function to record. See the documentation here. Make sure to call the function with SELECT * to get the parameters back as 3 columns.

    Please update your question to include the error you are getting, and if I can help I will update this answer to address it.

提交回复
热议问题