Re: quoting psql varible as identifier

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: quoting psql varible as identifier
Дата
Msg-id 162867791001211125i4dfe57f3h6d87bcc2c6d45bde@mail.gmail.com
обсуждение исходный текст
Ответ на Re: quoting psql varible as identifier  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: quoting psql varible as identifier  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
2010/1/21 Robert Haas <robertmhaas@gmail.com>:
> On Thu, Jan 21, 2010 at 12:53 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> add to state structure field like lexer_error. This field will be
>> checked before execution
>> it could be ugly for metacommands, there will be lot of new checks :(
>
> Eh?  The only places where we should need new tests are the places
> that check PQExpBufferBroken() now - there are only 6 calls to that
> function in src/bin/psql and not all of them need to be changed.  The
> places that do need to be changed will need to be modified to check
> PQExpBufferBroken() || lexer_coughed_up_a_lung.

no, it is only 6 calls because we don't check psql_scan_slash_option result.

When we don't allow escaping syntax in slash statement, then it could be simple.

we have to do some like:

if buffer_is_broken(..) report "out of memory"
else if global_error != true do ....
end if

Pavel


>
> It should be possible to do this pretty simply, I think.
>
> ...Robert
>


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Partitioning syntax
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Application name patch - v3