| От | David Johnston |
|---|---|
| Тема | Re: Return unknown resultset from a function |
| Дата | |
| Msg-id | 7445EC21-741B-42C0-BA04-79FFE34A573C@yahoo.com обсуждение |
| Ответ на | Return unknown resultset from a function (Jan Meyland Andersen <jma@agile.dk>) |
| Список | pgsql-general |
On Mar 4, 2012, at 14:52, Jan Meyland Andersen <jma@agile.dk> wrote: > How do I return an unknown resultset from a function > > My main problem is that I do not know how many columns or the data type of the columns before runtime. > It this possible at all? > > I also tried to return the data as a text array but I also have trouble with that. > > Regards > > Jan > Try HSTORE. You can return RECORD from the function but the SQL user still has to define the names/types at design time. Text array should work but you lose column names which HSTORE maintains. You could also return a delimited string and then split it in the calling routine. David J
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера