Trigger

Lists: pgsql-generalpgsql-hackerspgsql-interfaces
From: Sandeep Joshi <sjoshi(at)Zambeel(dot)com>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: create trigger : functions
Date: 2000-12-15 01:26:21
Message-ID: 3A39733D.245A8FA3@zambeel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces

Hi,
I have written a 'C' function to be called during INSERT trigger on a
table.

Are there any restrictions on the functions that can be called?

I know you can call SPI_* functions. But, can I call PQ* functions ?
e.g PQsetdb.

Is there any document which describes how the functions written for
trigger are executed?
Do they executed within the same process as server process or another
process is started to execute the commands?

regards,

Sandeep


From: Manika dey <bithi(at)ipr(dot)res(dot)in>
To: postgres-inter <pgsql-interfaces(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Trigger
Date: 2000-12-15 16:36:08
Message-ID: Pine.GSO.4.10.10012151133420.16384-100000@sun1.plasma.ernet.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces


Hi,
Can anyone help me .
I want to know how
to write triggers.
i am using java and postgresql


-------------------------------------------------------------------

From:- |
Ms. Manika Dey. |Ph.No:--
Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
I.P.R | EXT 336,315
BHAT, GANDHINAGAR | Residence -- 079 - 6619967
Gujrat -- 382 428 | FAX --- 69017
------------------------------------------------------------------



From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Manika dey <bithi(at)ipr(dot)res(dot)in>
Cc: postgres-inter <pgsql-interfaces(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] Trigger
Date: 2000-12-18 07:37:21
Message-ID: Pine.LNX.3.96.1001218082404.14499A-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers Postg윈 토토SQL : Postg윈


On Fri, 15 Dec 2000, Manika dey wrote:

>
> Hi,
> Can anyone help me .
> I want to know how
> to write triggers.
> i am using java and postgresql

not probably in java.... you can write function in some
"internal-interpreted-language": C, Perl, Tcl, SQL, PL/SQL

BTW, What is bad on PostgreSQL's docs?

Karel

PS. -hackers: What happen with PL/Python? Before 1/2 of year I ask if
anyone works on this and answer was: "yes, but 'he' is waiting for new
fmgr design". Tom's fmgr is done... IMHO it's big worse - The Python
has very good design for integration to other programs.


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Manika dey <bithi(at)ipr(dot)res(dot)in>, postgres-inter <pgsql-interfaces(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: [HACKERS] Trigger
Date: 2000-12-20 02:48:09
Message-ID: 200012200248.VAA15087@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces

> PS. -hackers: What happen with PL/Python? Before 1/2 of year I ask if
> anyone works on this and answer was: "yes, but 'he' is waiting for new
> fmgr design". Tom's fmgr is done... IMHO it's big worse - The Python
> has very good design for integration to other programs.

Good question. I don't remember this old message, though.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: vello(at)pyystel(dot)ee, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: PL/Python (was: Re: [GENERAL] Re: [HACKERS] Trigger)
Date: 2000-12-20 07:56:43
Message-ID: Pine.LNX.3.96.1001220084831.26633C-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces


On Tue, 19 Dec 2000, Bruce Momjian wrote:

> > PS. -hackers: What happen with PL/Python? Before 1/2 of year I ask if
> > anyone works on this and answer was: "yes, but 'he' is waiting for new
> > fmgr design". Tom's fmgr is done... IMHO it's big worse - The Python
> > has very good design for integration to other programs.
>
> Good question. I don't remember this old message, though.

... but I remember, in the archive is following message:

> Re: Hello PL/Python
> ____________________________
>
> * From: Hannu Krosing <hannu(at)tm(dot)ee>
> * To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
> * Subject: Re: Hello PL/Python
> * Date: Thu, 20 Jul 2000 12:30:54 +0300
> _________________________________________________________________
>
> Karel Zak wrote:
>>
>> Today afternoon I a little study libpython1.5 and I mean create
>> new PL language is not a problem.
>>
>> I a little play with it, and here is effect:
>>
>> test=# CREATE FUNCTION py_test() RETURNS text AS '
>> test'# a = ''Hello '';
>> test'# b = ''PL/Python'';
>> test'# plpython.retval( a + b );
>> test'# ' LANGUAGE 'plpython';
>> CREATE
>> test=#
>> test=#
>> test=# SELECT py_test();
>> py_test
>> -----------------
>> Hello PL/Python
>> (1 row)
>>
>> Comments? Works on this already anyone?
>
> There is a semi-complete implementation (i.e. no trigger procedures)
> by Vello Kadarpik (vello(at)pyystel(dot)ee).
>
> He is probably waiting for fmgr redesign or somesuch to complete before
> releasing it.
>
> ---------
> Hannu

Where is possible found it? IMHO it's really interesting feature.

Karel

--ELM980551534-4410-0_--


From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, vello(at)pyystel(dot)ee, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/Python (was: Re: [GENERAL] Re: Trigger)
Date: 2000-12-20 13:08:59
Message-ID: 3A40AF6B.9971C350@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces

Karel Zak wrote:
>
> On Tue, 19 Dec 2000, Bruce Momjian wrote:
>
> > > PS. -hackers: What happen with PL/Python? Before 1/2 of year I ask if
> > > anyone works on this and answer was: "yes, but 'he' is waiting for new
> > > fmgr design". Tom's fmgr is done... IMHO it's big worse - The Python
> > > has very good design for integration to other programs.
> >
> > Good question. I don't remember this old message, though.
>
> ... but I remember, in the archive is following message:
>
> > There is a semi-complete implementation (i.e. no trigger procedures)
> > by Vello Kadarpik (vello(at)pyystel(dot)ee).
> >
> > He is probably waiting for fmgr redesign or somesuch to complete before
> > releasing it.
> >
> > ---------
> > Hannu
>
> Where is possible found it? IMHO it's really interesting feature.

Perhaps Vello will answer directly, but IIRC he stopped working on it
after
a more clean implementation of the same was posted on this list.

--------------
Hannu


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: vello(at)pyystel(dot)ee, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/Python (was: Re: [GENERAL] Re: Trigger)
Date: 2001-01-23 04:47:40
Message-ID: 200101230447.XAA07025@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces


Comments anyone?

>
> On Tue, 19 Dec 2000, Bruce Momjian wrote:
>
> > > PS. -hackers: What happen with PL/Python? Before 1/2 of year I ask if
> > > anyone works on this and answer was: "yes, but 'he' is waiting for new
> > > fmgr design". Tom's fmgr is done... IMHO it's big worse - The Python
> > > has very good design for integration to other programs.
> >
> > Good question. I don't remember this old message, though.
>
> ... but I remember, in the archive is following message:
>
> > Re: Hello PL/Python
> > ____________________________
> >
> > * From: Hannu Krosing <hannu(at)tm(dot)ee>
> > * To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
> > * Subject: Re: Hello PL/Python
> > * Date: Thu, 20 Jul 2000 12:30:54 +0300
> > _________________________________________________________________
> >
> > Karel Zak wrote:
> >>
> >> Today afternoon I a little study libpython1.5 and I mean create
> >> new PL language is not a problem.
> >>
> >> I a little play with it, and here is effect:
> >>
> >> test=# CREATE FUNCTION py_test() RETURNS text AS '
> >> test'# a = ''Hello '';
> >> test'# b = ''PL/Python'';
> >> test'# plpython.retval( a + b );
> >> test'# ' LANGUAGE 'plpython';
> >> CREATE
> >> test=#
> >> test=#
> >> test=# SELECT py_test();
> >> py_test
> >> -----------------
> >> Hello PL/Python
> >> (1 row)
> >>
> >> Comments? Works on this already anyone?
> >
> > There is a semi-complete implementation (i.e. no trigger procedures)
> > by Vello Kadarpik (vello(at)pyystel(dot)ee).
> >
> > He is probably waiting for fmgr redesign or somesuch to complete before
> > releasing it.
> >
> > ---------
> > Hannu
>
>
> Where is possible found it? IMHO it's really interesting feature.
>
> Karel
>
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: vello(at)pyystel(dot)ee, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/Python (was: Re: [GENERAL] Re: Trigger)
Date: 2001-01-23 15:48:58
Message-ID: Pine.LNX.3.96.1010123164047.10618A-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-hackers pgsql-interfaces


> Comments anyone?

Yes Bruce, I already told about it with Peter in private mails. Because
it's 1/2 of year and nobody answer I already start work on PL/Python.

The PL/Python will in 7.2 - as soon as I can I send some proposal to
hackers list.

Karel

> >
> > On Tue, 19 Dec 2000, Bruce Momjian wrote:
> >
> > > > PS. -hackers: What happen with PL/Python? Before 1/2 of year I ask if
> > > > anyone works on this and answer was: "yes, but 'he' is waiting for new
> > > > fmgr design". Tom's fmgr is done... IMHO it's big worse - The Python
> > > > has very good design for integration to other programs.
> > >
> > > Good question. I don't remember this old message, though.
> >