Re: Underscore in positional parameters?

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: Underscore in positional parameters?
Дата
Msg-id ae58cb4d-0db9-47eb-be76-b2667fff0fd6@ewie.name
обсуждение исходный текст
Ответ на Re: Underscore in positional parameters?  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Underscore in positional parameters?
Список pgsql-hackers
On 2024-05-17 02:06 +0200, Michael Paquier wrote:
> On Thu, May 16, 2024 at 08:41:11AM +0200, Peter Eisentraut wrote:
> > On this specific patch, maybe reword "parameter too large" to "parameter
> > number too large".
> 
> WFM here.

Done in v3.

I noticed this compiler warning with my previous patch:

    scan.l:997:41: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      997 |                                         ErrorSaveContext escontext = {T_ErrorSaveContext};
          |                                         ^~~~~~~~~~~~~~~~

I thought that I had to factor this out into a function similar to
process_integer_literal (which also uses ErrorSaveContext).  But moving
that declaration to the start of the {param} action was enough in the
end.

While trying out the refactoring, I noticed two small things that can be
fixed as well in scan.l:

* Prototype and definition of addunicode do not match.  The prototype
  uses yyscan_t while the definition uses core_yyscan_t.

* Parameter base of process_integer_literal is unused.

But those should be one a separate thread, right, even for minor fixes?

-- 
Erik

Вложения

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there