Re: stored procedures

From: "Mitch Vincent" <mitch(at)venux(dot)net>
To: <pgsql-general(at)postgresql(dot)org>, "Alexander Lohse" <al(at)humantouch(dot)de>
Subject: Re: stored procedures
Date: 2001-05-03 08:06:41
Message-ID: 002001c0d3a7$fceb4490$1251000a@windows
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> So, I am not really sure what is the benefit of writing logic inside the
DB.
> Is there a performance benefit compared to processing via PHP?

One key benefit aside from anything else would be the ability to call
the stored proceedure no matter how you were interfacing to the database.
I've found this useful on many occasions.

> I do not really see the use for me to separate logic from the other logic,
> 'cause then you'll have to worry about 2 sources!

Sort of, it really depends on exactly what you're doing. Doing things in
the database might not be the best thing for you..

> (I usually have a DB only used by that specific application, and if
> not it is at least the same language, so global function are stored
> in shared code libraries.)

What if you write a web app and a windows app that connects to the same
database? Storing logic in the database allows both to share the code... One
of several uses, of course.

> I see this is a powerful feature and it seems to make sense, but when
> I scan across my apps, currently using MySQL, I am having a hard time
> to imagine where I could use it.

It might not benefit you at all -- no one says you have to use it.. :-)

> It would help me lot, if anyone could help me here to jump on that train.
> Maybe one can tell me what he does with this opporunity.

Hope I helped, I'm sure others have more (and probably better) examples
for you..

-Mitch

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey E. Volkov 2001-05-03 08:29:57 Re: Ideal hardware configuration for pgsql
Previous Message Diana Cionoiu 2001-05-03 08:00:56 Re: troubles with postgresql 7.0.2