| От | Joe Conway |
|---|---|
| Тема | Re: [SQL] function return multiply rows |
| Дата | |
| Msg-id | 3D948B07.5050205@joeconway.com обсуждение исходный текст |
| Ответы |
Re: [SQL] function return multiply rows
|
| Список | pgsql-general |
Jeroen Olthof wrote: > What is going wrong here? > > An example of what I'm trying to do. > > vw_teams is a view but same problem when trying it on a single table > CREATE FUNCTION test() RETURNS SETOF vw_teams AS 'select * from vw_teams;' > LANGUAGE 'sql'; > > SELECT test(); > > results in > > test > ----------- > 137789256 > 137789256 > (2 rows) The capability to return composite types (multi-column rows) is limited in <= PostgreSQL 7.2.x. What you are seeing are pointers to the rows, not the rows themselves. Version 7.3, in beta testing now, will do what you are looking for. If you can, please give it a try. See: http://developer.postgresql.org/docs/postgres/xfunc-tablefunctions.html for more info and examples. HTH, Joe
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера