Return multiple columns and rows from a function PostgreSQL instead of record

后端 未结 3 738
滥情空心
滥情空心 2021-01-19 07:52

I was reading online about function on PostgreSQL and returns results In this links:

  1. SQL function return-type: TABLE vs SETOF records
  2. How do I referen
3条回答
  •  感情败类
    2021-01-19 08:12

    Functions returning a table (or setof) should be used in the FROM clause:

    select * 
    from brand_hierarchy(1234)
    

提交回复
热议问题