From: | novnov <novnovice(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trigger function which inserts into table; values from lookup |
Date: | 2007-05-21 00:36:05 |
Message-ID: | 10711732.post@talk.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
It's an after trigger.
Any clue re my question?
Alvaro Herrera-7 wrote:
>
> novnov escribió:
>>
>> Inching closer; the following handles the dupe key error but doesn't
>> insert
>> the rows it should either. So, the exception is ending the insert, and
>> not
>> continuing to insert for rows that don't violate the unique key
>> restraint.
>> Is there a way around this or will I need to take a different approach?
>
> You have to make the function return NEW, not NULL, if this is a BEFORE
> trigger.
>
>
> --
> Alvaro Herrera
> http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>
--
View this message in context: http://www.nabble.com/Trigger-function-which-inserts-into-table--values-from-lookup-tf3784731.html#a10711732
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-21 03:43:26 | Re: Trigger function which inserts into table; values from lookup |
Previous Message | Alvaro Herrera | 2007-05-20 23:57:43 | Re: Trigger function which inserts into table; values from lookup |