From: | Jon Jensen <jon(at)endpoint(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: pg_get_constraintdef() doesn't always give an equal constraint |
Date: | 2015-03-30 16:13:58 |
Message-ID: | alpine.LFD.2.11.1503301011450.2321@ybpnyubfg6.ybpnyqbznva6 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Sun, 29 Mar 2015, Tom Lane wrote:
> Jon Jensen <jon(at)endpoint(dot)com> writes:
>> On Sat, 28 Mar 2015, Tom Lane wrote:
>>> We could possibly use this approach as a one-shot test for vetting a
>>> proposed patch ... but as you've got it set up, it seems like it
>>> requires manual inspection of each output to see if it's OK or not,
>>> which isn't all that helpful.
>
>> Well, as part of the standard regression test suite it's comparing stored
>> expected output with newly-generated output, like all the other tests. I
>> must be misunderstanding what you mean because nothing manual about that,
>> is there?
>
> My point is that the expected output has to be manually checked initially
> to see if it's right or not; and since it often doesn't look exactly like
> the original SQL, that checking is painful and not foolproof.
Oh, I see what you mean. I'm going from the assumption that a new
regression test is useful even if it starts life documenting only the
current behavior, without any idea of whether that was or is correct by
some outside standard.
I think we should know if the parse/deparse round-trip changes behavior
due to some change, regardless of whether it's better or worse. The
regression test should call our attention to it and then we can spend the
human cycles to investigate whether it's better now, or worse. In any
case, the difference could cause trouble for people who depended on the
old behavior, even if the new is ostensibly better.
> It's interesting to consider something like the COPY_PARSE_PLAN_TREES
> #define, which inserts code into the backend to see whether copyfuncs.c
> and equalfuncs.c are sane or not. Running the regression tests with
> that turned on provides pretty thorough coverage of those modules.
Maybe that's the way to go, then, if it avoids the necessity of creating
all those tables with CHECK constraints, since we don't have a
user-accessible parse function.
Jon
--
Jon Jensen
End Point Corporation
https://www.endpoint.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-03-30 16:21:57 | Re: pg_get_constraintdef() doesn't always give an equal constraint |
Previous Message | Tom Lane | 2015-03-30 15:02:31 | Re: pg_get_constraintdef() doesn't always give an equal constraint |