Return a table from a function

Поиск
Список
Период
Сортировка
От Simon Connah
Тема Return a table from a function
Дата
Msg-id b6uFTyH937VOq3XGPT7xAS9Po7-3kwphF834W8eNTl4od008FNoSKn7HPlQnUooaVdk0t1ATa3b6PxJFh3pqF87VTLNJ82VTUXhMkjEqsAs=@protonmail.com
обсуждение исходный текст
Ответы Re: Return a table from a function  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-novice
Hi,

I've written a function that returns a table. It works fine and I get the expected results. The only problem is that in
Node.jswhich is the client the table data is a string rather than a list of variables. Is there some way to change the
returndata so it is still like a table but in something like JSON? Or even better is there a way to return it as the
individualrows so that each column can be easily accessed? I'm using pg-promise to access PostgreSQL from a Node.js web
application.

Simon.


Вложения

В списке pgsql-novice по дате отправления:

Предыдущее
От: Peter Wright
Дата:
Сообщение: Restricting certain users from accessing PUBLIC resources
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Return a table from a function