Re: [HACKERS] plpgsql - additional extra checks - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] plpgsql - additional extra checks
Date
Msg-id CAFj8pRAn1gdvxExgzw187X+i3RSOzSOZV=j+Nvo3G2tELbC7HQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] plpgsql - additional extra checks  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers


Committed, with some minor changes:

1) The too_many_rows check in exec_stmt_execsql included the errhint
conditionally, depending on force_error variable

    force_error = stmt->strict || stmt->mod_stmt;
    use_errhint = !force_error;

That is, the hint was not included when force_error=true, which does not
seem quite necessary. Based on off-list discussion with Pavel this was
unnecessary, so the hint is now included always.

2) The comment in plpgsql.h still mentioned "compile-time" checks only,
but the new checks are run-time checks. So tweaked accordingly.

3) A couple of minor formatting / code style changes.

Many thanks

Pavel



regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: "Imai, Yoshikazu"
Date:
Subject: RE: Locking B-tree leafs immediately in exclusive mode
Next
From: David Fetter
Date:
Subject: Re: Early WIP/PoC for inlining CTEs