Re: Where is PLbash ??

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Where is PLbash ??
Дата
Msg-id 3D19DE2B.5387114B@Yahoo.com
обсуждение исходный текст
Ответ на Re: Where is PLbash ??  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Where is PLbash ??  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-interfaces
Bruce Momjian wrote:
> 
> Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > > Tom Lane wrote:
> > >> There's a difference between making a dangerous thing possible and
> > >> encouraging people to do it.  But I'll wait and see what Peter thinks.
> >
> > > I think Peter agrees with you.  My point is that we can PL/sh and
> > > document it's limitations.  With perl, the ability is there but it isn't
> > > obviouis why it is a problem.
> >
> > Well, there's some merit in that argument: the pl/sh chapter would be an
> > ideal place to explain in bright red letters why pl/sh is dangerous ;-),
> > and then we could cross-reference that discussion from plperlu and
> > pltclu, which don't really have good places to put a long discussion
> > about the risks.
> 
> All I know is that from a shell I can do:
> 
>         echo "You lost money" | mail -s "Lost money" fred
> 
> pretty easily.  Hard to make anything simpler that that, and I can't
> imagine the other  languages are any faster or simpler.

http://sourceforge.net/projects/pgmail/

> I think sending email is an archetypal stored procedure action.  I
> realize it isn't great, but it meets people's needs who have to do it.

I agree with Tom though, that this should be some kind of general client
task using a NOTIFY mechanism. This mechanism needs two parts, a
function that schedules the action putting the required info for the
client into some tables, then notifies. And respective functionality in
the client, that then performs these tasks and returs execution results
into the database.

> You can argue that people shouldn't want to do such things, but they
> obviously want to do them, so why not give them a way, and warn them at
> the same time.

They want them, sure. But if you want to satisfy their wishes, give them
a tool, not a dangerous kludge.


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




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

Предыдущее
От: "Jamie Blacoe"
Дата:
Сообщение: unsubscribe
Следующее
От: Sandro Dentella
Дата:
Сообщение: libpgtcl and secured connection