Обсуждение: CREATE CONSTRAINT TRIGGER

Поиск
Список
Период
Сортировка

CREATE CONSTRAINT TRIGGER

От
Alvaro Herrera
Дата:
Some time ago, CREATE CONSTRAINT TRIGGER was a deprecated command and it
was slated for obsolence or removal.

Recent developments have turned it back into non-deprecated mode; it's
not going anywhere, and it needs to be fully documented.

It seems to me that it makes more sense to merge its documentation into
the CREATE TRIGGER page, where it belongs.  Right now, the documentation
page for CREATE CONSTRAINT TRIGGER is 50% a repetition of what's in the
CREATE TRIGGER page; and a significant portion of the rest is spent
telling the user to refer to the CREATE TRIGGER page.  The original
information to be found in CREATE CONSTRAINT TRIGGER is not all that
much.

Thus the attached patch.

--
Álvaro Herrera <alvherre@alvh.no-ip.org>

Вложения

Re: CREATE CONSTRAINT TRIGGER

От
Richard Broersma
Дата:
On Fri, Nov 5, 2010 at 2:37 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

> Recent developments have turned it back into non-deprecated mode; it's
> not going anywhere, and it needs to be fully documented.

From what I recall, there isn't anything in the trigger documentation
or CREATE CONSTRAINT TRIGGER documentation that says the trigger
function must explicitly raise an exception to create the notification
that the custom constraint was violated.


Would this be a good place for it?

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug


Re: CREATE CONSTRAINT TRIGGER

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Some time ago, CREATE CONSTRAINT TRIGGER was a deprecated command and it
> was slated for obsolence or removal.

> Recent developments have turned it back into non-deprecated mode; it's
> not going anywhere, and it needs to be fully documented.

> It seems to me that it makes more sense to merge its documentation into
> the CREATE TRIGGER page, where it belongs.

Seems reasonable.  I didn't read the patch in detail though.
        regards, tom lane


Re: CREATE CONSTRAINT TRIGGER

От
Alvaro Herrera
Дата:
Excerpts from Richard Broersma's message of vie nov 05 18:54:54 -0300 2010:
> On Fri, Nov 5, 2010 at 2:37 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> 
> > Recent developments have turned it back into non-deprecated mode; it's
> > not going anywhere, and it needs to be fully documented.
> 
> From what I recall, there isn't anything in the trigger documentation
> or CREATE CONSTRAINT TRIGGER documentation that says the trigger
> function must explicitly raise an exception to create the notification
> that the custom constraint was violated.
> 
> 
> Would this be a good place for it?

I added a sentence about this, and pushed it.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support