Re: review: CHECK FUNCTION statement

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: review: CHECK FUNCTION statement
Date: 2011-12-17 21:25:02
Message-ID: CAFj8pRAHvdY1GymFji_WY0wZk=1vFj5bqAy-_h5JHnWS27kenQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

>
> You have the option "fatal_errors" for the checker function, but you
> special case it in CheckFunction(CheckFunctionStmt *stmt) and turn
> errors to warnings if it is not set.
>
> Wouldn't it be better to have the checker function ereport a WARNING
> or an ERROR depending on the setting? Options should be handled by the
> checker function.
>

A would to process fatal_errors out of checker function - just it is
more robust. This flag has not too sense in plpgsql - but can have a
more sense in other languages.

But I'll think again about flags

note about warnings and errors. Warnings are useless on checker
function level, because they are just shown, but they cannot be
trapped.

maybe result based on tuplestore can be better - I have to look on it.

Regards

Pavel

> Yours,
> Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2011-12-17 21:33:24 Page Checksums
Previous Message Pavel Stehule 2011-12-17 21:00:56 Re: review: CHECK FUNCTION statement