| От | Richard Huxton |
|---|---|
| Тема | Re: Function to return a multiple colmn table or view |
| Дата | |
| Msg-id | 462E27D4.5020307@archonet.com обсуждение исходный текст |
| Ответ на | Function to return a multiple colmn table or view ("Wilkinson, Jim" <Jim.Wilkinson@cra-arc.gc.ca>) |
| Список | pgsql-sql |
Don't forget to cc: the list Wilkinson, Jim wrote: > Hi Richard, your example worked find , but when I substitue my view into > the function and the tale name, I get the following error: > > ERROR: wrong record type supplied in RETURN NEXT > CONTEXT: Pl/pqSQL function "create_view" line 11 at return next The columns you're returning from the function don't match it's definition. If the function is defined as RETURNS SETOF X then it needs to return columns that match X. If you need to you can create a custom type (see "CREATE TYPE" in the manuals). If you want one function that returns different types then you can't have it. -- Richard Huxton Archonet Ltd
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера