Re: minimal update - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: minimal update
Date
Msg-id 4908C936.4070105@dunslane.net
Whole thread Raw
In response to Re: minimal update  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: minimal update
List pgsql-hackers

Andrew Dunstan wrote:
>
>
> David Fetter wrote:
>>>
>>> Maybe we should fix our C sample trigger, from which this was taken.
>>>     
>>
>> Yes :)
>>
>> Does the attached have the right error code?
>>
>> -        elog(ERROR, "trigf: not called by trigger manager");
>> +        ereport(ERROR,
>> +                (error(TRIGGERED_DATA_CHANGE_VIOLATION),
>> +                 errmsg("trigf: not called by trigger manager")));
>>
>>   
>
> Not sure that's appropriate, but I can't see anything else that is 
> very appropriate either.


The plpgsql code uses errcode(ERRCODE_FEATURE_NOT_SUPPORTED) for this 
situation, so I guess we should be consistent with that.

cheers

andrew



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1155)
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL network discovery