Hello all, I am fairly new to PostgreSQL and I am right now converting a database from SQL server. SQL server can return multiple select statements in the function body. Is there any way to return a function with two different resultsets? select * from table1; select * from table2; Thanks for your time and help
iseyfi@vt.edu (ismail) writes:
> I am fairly new to PostgreSQL and I am right now converting a database
> from SQL server. SQL server can return multiple select statements in
> the function body. Is there any way to return a function with two
> different resultsets?
You can fake it in some cases by returning opened cursors. See the
plpgsql docs' discussion of working with cursors. Of course this will
only work for resultsets that you can specify as a SQL query.
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера