| От | Richard Huxton |
|---|---|
| Тема | Re: Function not return zero record |
| Дата | |
| Msg-id | 44D23276.4090100@archonet.com обсуждение исходный текст |
| Ответ на | Function not return zero record (Sylvain Racine <syracine@sympatico.ca>) |
| Список | pgsql-sql |
Sylvain Racine wrote: > Hello, > > I wrote a simple function who checks in a table an address and returns > the id and coordinates of the corresponding address. > > The problem is when I run separately the SQL query, it gives me zero (0) > entry when I submit a new address - it is what I want as result - and > when I run my function, it gives me 1 entry with the same address. > > Note: I create a pseudo-type to return the result. Is that my problem? The problem is the difference between a value of type getCache and a set of values of type getCache. Define your function as returning a SETOF getCache Call it with SELECT * FROM getCache(...) HTH -- Richard Huxton Archonet Ltd
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера