Need help in triggers

--0016364ed73af84c6804752c6ef3
Content-Type: text/plain; charset=ISO-8859-1

Hi all's
i am working on an application in which we are using PostgreSql as an
database, i need to write trigger for my application. Can any one help me
how can i write it.
i have try to write it, but did not get success.

--
Regard's
Yogendra kaushik

--0016364ed73af84c6804752c6ef3--
Yogendra Kaushik [ Mo, 05 Oktober 2009 11:06 ] [ ID #2018087 ]

Re: Need help in triggers

Read the manual:

http://www.postgresql.org/docs/8.1/interactive/sql-createtri gger.html

Best
_Pavan

On Monday 05 October 2009 14:36:47 Yogendra Kaushik wrote:
> Hi all's
> i am working on an application in which we are using PostgreSql as an
> database, i need to write trigger for my application. Can any one help me
> how can i write it.
> i have try to write it, but did not get success.
>
> --
> Regard's
> Yogendra kaushik
>

--
-Pavan Keshavamurthy
http://grahana.net/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Pavan Keshavamurthy [ Mo, 05 Oktober 2009 15:06 ] [ ID #2018088 ]

Re: Need help in triggers

Yogendra Kaushik wrote:
> Hi all's
> i am working on an application in which we are using PostgreSql as an
> database, i need to write trigger for my application. Can any one help me
> how can i write it.
> i have try to write it, but did not get success.
>
>
do you using PEAR? to help database?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
bedul [ Di, 06 Oktober 2009 00:11 ] [ ID #2018089 ]

Re: Need help in triggers

What are you really want to do ? This is an exemple:

CREATE FUNCTION myfunction () RETURNS trigger AS $$
BEGIN
NEW.update_date = 'now'::date;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;

CREATE TRIGGER set_update_date AFTER INSERT ON matable FOR EACH ROW
EXECUTE PROCEDURE myfunction();

Le lundi 05 octobre 2009 à 14:36 +0530, Yogendra Kaushik a écrit :
> Hi all's
> i am working on an application in which we are using PostgreSql as an
> database, i need to write trigger for my application. Can any one help me
> how can i write it.
> i have try to write it, but did not get success.
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Samuel ROZE [ Mo, 05 Oktober 2009 19:35 ] [ ID #2018090 ]
PHP » gmane.comp.php.database » Need help in triggers

Vorheriges Thema: PDO PgSQL: _pdo_pgsql_notice
Nächstes Thema: Sorting MYSQL results Paging and column heads