PostgreSQL function Return table

后端 未结 1 1102
眼角桃花
眼角桃花 2020-12-22 00:51

i want to setup a function on PostgreSQL which returns a table. This is the source code of the function:

   CREATE OR REPLACE FUNCTION feiertag(inDate Date)          


        
相关标签:
1条回答
  • 2020-12-22 01:04

    Use

    SELECT *
           FROM feiertag('2017-01-01');
    

    instead of

    SELECT feiertag('2017-01-01');
    

    to get the result as a table.

    (Treat the function as if it were a table.)

    0 讨论(0)
提交回复
热议问题