From: | "Steve Brett" <steve(dot)brett(at)e-mis(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: triggers |
Date: | 2001-10-10 11:33:53 |
Message-ID: | 9q1bs8$1t7h$1@news.tht.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Kevin HaleBoyes" <kcboyes(at)yahoo(dot)com> wrote in message
news:3BC30E19(dot)1030203(at)yahoo(dot)com(dot)(dot)(dot)
> I'm currently running a database on Oracle and would like to make my
> application portable to the PostgreSQL database. Converting the tables
> (specifically the attribute types) is fairly easy but I've run into a
> problem with database triggers.
>
> My application is designed so that insertions/updates to certain tables
> only provide a limited number of attributes and an Oracle trigger fills
> in the other attributes. For example, one table may have id and name
> attributes but when the application inserts new records it only provides
> the name value and a trigger fills in the id value (from a sequence
number).
>
choose a serial datatype and a sequence will be created and the default
value set.
have a look at the docs for nextval, currval and setval.
AFAIK triggers can be implemented as functions and writtenin a few different
languages but support needs to be compiled into postgresql.
> I started looking at the trigger support in PostgreSQL and found what I
> needed except I'm not sure how to write the "body" of the trigger. In
> Oracle I write PL/SQL but it seems I may have to write C code on the
> PostgreSQL side. Is this true? Is there a PostgreSQL procedural language
> that I can write the body in?
>
> Thanks,
> Kevin.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Eric D Nielsen | 2001-10-10 13:50:02 | Re: Problems installing with --with-python |
Previous Message | sanjay.dixit | 2001-10-10 11:28:44 | Problem : Pound to Hash sign |