node-postgres
node-postgres copied to clipboard
Undefined row fields when calling select * in a stored function
I have created a Stackoverflow question, because I came across an issue (see: http://stackoverflow.com/questions/21932378/extracting-results-from-a-select-in-node-pg/21934047).
When a stored function contains a SELECT * statement and it is called from Node PG, it seems PG is able to detect that some rows are returned. However, the fields' content is undefined.
It seems that the returned result is something like: (SID-1,{},10) and that pg does not parse it properly.
My bad, I was not calling PG properly. I should have called:
SELECT * FROM SessionGet('SID-1'::varchar);
instead of:
SELECT SessionGet('SID-1'::varchar);