sql - PostgreSQL outputs table formatted as array instead of table -
i experimenting functions in postgresql, , got working fine, there confusing. have header of function:
create or replace function p.getevents(date) returns table (when date, participant varchar, helper varchar) $$ begin (....) and thought going return table (hence return table!) this:
when | participant | helper --------+-------------------+----------- | | but instead returning me results looking array, such as:
(2015-03-21, participant, helper) (2015-04-10, participant, helper) isn't returns table right way build table output? how can force output table , not comma separated values?
use
select * getevent(current_date); because
select getevent(current_date); returns rows 1 column of pseudotype record.
Comments
Post a Comment