| От | Dmitry Tkach |
|---|---|
| Тема | Re: database abstraction -> functions |
| Дата | |
| Msg-id | 3D91C22A.2060500@openratings.com обсуждение исходный текст |
| Список | pgsql-sql |
Jeroen Olthof wrote: > Hi, > > When developing applications is a good thing to create abstraction between > different layers > The one concerning the database would be the persistence layer. To create > such abstraction I want all mij datababase activitie runned through > functions. But how can I return a set of rows instead of a single datatype > (I looked into the setof but never found a clear simple)? > A very simple answer - there is no way to do what you want :-( They promise to have it in 7.3... I am using a workaround, where my functions glue all the columns together into a pipe-separated line, that I then parse back into columns in my application... Also, note that, unless your functions are in C (anything like plpgsql, or just sql), they are slow like hell... In that case, you are much better off implementing your abstraction layer through views... Dima
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера