Re: best practice for use of functions..

Поиск
Список
Период
Сортировка
От Allen Landsidel
Тема Re: best practice for use of functions..
Дата
Msg-id 6.0.0.22.2.20040114224844.031c15d8@pop.hotpop.com
обсуждение исходный текст
Ответ на Re: best practice for use of functions..  (Doug McNaught <doug@mcnaught.org>)
Ответы Re: best practice for use of functions..  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Aren't there some caveats to this related to transactions?  I've been
working under the strong (I think I read.. heh) impression that
transactions cannot be nested, in 7.3 at least..

This would lead me to believe if the 'main' function called another that
failed and thus issued a rollback, would that not rollback the entire
meta-transaction, for lack of a better word?

-Allen

At 21:26 1/14/2004, Doug McNaught wrote:
>"Chris Ochs" <chris@paymentonline.com> writes:
>
> > My preferred method is to have a function for each table that I do an
> insert
> > into, it's easier to manage that way and a lot easier to make changes if I
> > add/drop columns and tables.  Right now I have one function that is called
> > by my application that in turn calls all the other functions.
> >
> > I am wondering is there is a significant overhead for calling say 10
> > functions from within a function compared to putting everything into one
> > single function?
>
>Compared to the disk I/O overhead for a transaction, it'd be lost in
>the noise--do whatever makes you happy.  :)
>
>-Doug
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


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

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: best practice for use of functions..
Следующее
От: Bret Busby
Дата:
Сообщение: Re: Postgress and MYSQL