Re: plpgsql.warn_shadow

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Florian Pflug <fgp(at)phlo(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: plpgsql.warn_shadow
Date: 2014-02-09 02:06:14
Message-ID: 52F6E296.8060307@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/27/14, 12:04 PM, Simon Riggs wrote:
> Florian's point was well made and we must come up with something that
> allows warning/errors at compile time and once accepted, nothing at
> run time.

I've been thinking about this, and I'm not sure I like this idea all
that much. For compile-time warnings this would probably be the ideal
behaviour, but if we were to add any run-time warnings (e.g.
consistent_into) I'm not sure how I would use such a feature.

Say I run my test suite with all warnings enabled, and now I want to
know that it didn't produce any warnings. How would I do that? I guess
I could grep the log for warning messages, but then I'd have to maintain
a list of all warnings somewhere, which seems quite ugly. A special
SQLSTATE for PL/PgSQL warnings doesn't seem that much better.

But maybe I'm overthinking this and we'd only ever have one runtime
warning (or maybe none at all, even) and this would not be an issue in
practice.

Regards,
Marko Tiikkaja

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2014-02-09 02:23:26 Re: clang's -Wmissing-variable-declarations shows some shoddy programming
Previous Message Thom Brown 2014-02-09 01:13:17 Re: Changeset Extraction v7.5