Re: Stored Procedure performance / elegance question
| От | Tony Caduto |
|---|---|
| Тема | Re: Stored Procedure performance / elegance question |
| Дата | |
| Msg-id | 4506E2F9.8040707@amsoftwaredesign.com обсуждение исходный текст |
| Ответ на | Stored Procedure performance / elegance question ("Karen Hill" <karen_hill22@yahoo.com>) |
| Список | pgsql-general |
Karen Hill wrote: > x-no-archive:yes > > Hello. > > I have a stored procedure which returns a setof record. The function > takes a few arguments, and if a couple of specific input values are > null, it is required that the stored procedure perform different > actions. > > I know that the planner does not store the plan when EXECUTE is used in > a function, but the function looks better when the sql is created > dynamically. > > Karen, My particular opinion on this is to only use execute if you need it. If you don't need it don't use it. A example where you would need execute is if you wanted to create a new user from inside a function with a passed in username. Another example where you would need EXECUTE is if you are working with temp tables in a function. Later, -- Tony Caduto AM Software Design http://www.amsoftwaredesign.com Home of PG Lightning Admin for Postgresql Your best bet for Postgresql Administration
В списке pgsql-general по дате отправления: