Re: Question about functions

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Question about functions
Дата
Msg-id 43538843.5000308@archonet.com
обсуждение исходный текст
Ответ на Question about functions  (Mike Plemmons <mikeplemmons@gmail.com>)
Список pgsql-sql
Mike Plemmons wrote:
>>
>>These are great tips! I will be more specific the next time I post.
>>Regarding the ineffiencient query. What do you suggest as a better way? I
>>would rather learn proper methods than continue to use improper ones.

Just send the query directly from the application - the way you're doing 
it, the function will have to assemble the query, execute it, fetch all 
the results and then return them to your application. Of course, if your 
query altered each row as it fetched them (e.g. to calculate a running 
total) then this would be a sensible approach.

PS - don't forget to CC: the list when replying - that's the convention 
around here.
--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Question about functions
Следующее
От: David Pradier
Дата:
Сообщение: Re: Design problem : using the same primary keys for inherited objects.