RE: a trigger that sends an email + returning multiple records

From: "Oscar Serrano" <oserra(at)fondos(dot)net>
To: "Moray McConnachie" <moray(dot)mcconnachie(at)computing-services(dot)oxford(dot)ac(dot)uk>, "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: a trigger that sends an email + returning multiple records
Date: 2000-04-06 11:23:57
Message-ID: NDBBKNFDELOHICEHIMGGMELGCCAA.oserra@fondos.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> -----Mensaje original-----
> De: Moray McConnachie
> [mailto:moray(dot)mcconnachie(at)computing-services(dot)oxford(dot)ac(dot)uk]
> Enviado el: jueves, 06 de abril de 2000 13:09
> Para: Oscar Serrano; pgsql-interfaces(at)postgreSQL(dot)org
> Asunto: Re: [INTERFACES] a trigger that sends an email + returning
> multiple records
>
>
> 7.0 provides support for calling Perl functions, although I
> haven't had time
> to experiment with it. In beta4 (not sure about earlier betas), it can be
> found in the src/interfaces/perl5 directory, with examples in the eg
> subdirectory beneath that...
> Looks pretty good, although I guess it still can't return
> multiple records.

This sounds really interesting. I will have to try it.

But I don't really undertand the rest of the email. I do not need
a function that returns any record. It just must open the sendmail and
send an email. And it must be done each time a record is inserted on
a table.

> Incidentally, I've just thought of a work around for not being able to
> return multiple records, although I'm not sure how exactly it would work.
> Could one have a function that would create a table with (e.g.) a random
> time-based name, fill it with the desired records, and return the name of
> the table as the result of the argument?
>
> Could one do for example, something like
>
> SELECT searchid FROM searchfunction('criteria1','criteria2','criteria3')
>
> or is that going to be rejected because you can't have functions returning
> tablenames?
>
> Haven't got time to look at any of this :-<
> Yours,
> Moray
> ----------------------------------------------------------------
> Moray(dot)McConnachie(at)computing-services(dot)oxford(dot)ac(dot)uk
> ----- Original Message -----
> From: "Oscar Serrano" <oserra(at)fondos(dot)net>
> To: "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
> Sent: Thursday, April 06, 2000 9:50 AM
> Subject: [INTERFACES] a trigger that sends an email
>
>
> > Hi:
> >
> > I need to do something special.
> > I need that when a new record is inserted in one of my tables,
> the system
> > sends an email.
> > I thing I need to create a trigger. And I thing I need to create a
> function
> > that sends an email.
> > Is it possible?
> > May I do the function that sends the email in Perl?
> >
> > Any idea?
> >
> > Thank you very much.
> >
> >
> >

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Moray McConnachie 2000-04-06 13:51:05 Re: a trigger that sends an email + returning multiple records
Previous Message Moray McConnachie 2000-04-06 11:09:11 Re: a trigger that sends an email + returning multiple records