Re: Improving contrib/tablefunc's error reporting

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Improving contrib/tablefunc's error reporting
Дата
Msg-id 2ffbe2e7-2c66-438f-bfce-1a69ec0eeb3a@joeconway.com
обсуждение исходный текст
Ответ на Improving contrib/tablefunc's error reporting  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Improving contrib/tablefunc's error reporting  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 3/5/24 17:04, Tom Lane wrote:
> After reading the thread at [1], I could not escape the feeling
> that contrib/tablefunc's error reporting is very confusing.
> Looking into the source code, I soon found that it is also
> very inconsistent, with similar error reports being phrased
> quite differently.  The terminology for column names doesn't
> match the SGML docs either.  And there are some places that are
> so confused about whether they are complaining about the calling
> query or the called query that the output is flat-out backwards.
> So at that point my nascent OCD wouldn't let me rest without
> fixing it.  Here's a quick patch series to do that.
> 
> For review purposes, I split this into two patches.  0001 simply
> adds some more test cases to reach currently-unexercised error
> reports.  Then 0002 makes my proposed code changes and shows
> how the existing error messages change.
> 
> I'm not necessarily wedded to the phrasings I used here,
> in case anyone has better ideas.

The changes all look good to me and indeed more consistent with the docs.

Do you want me to push these? If so, development tip  only, or backpatch?

> BTW, while I didn't touch it here, it seems fairly bogus that
> connectby() checks both type OID and typmod for its output
> columns while crosstab() only checks type OID.  I think
> crosstab() is in the wrong and needs to be checking typmod.
> That might be fit material for a separate patch though.

I can take a look at this. Presumably this would not be for backpatching.

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kambam Vinay
Дата:
Сообщение: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Improving contrib/tablefunc's error reporting