Re: patch (for 9.1) string functions

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: patch (for 9.1) string functions
Дата
Msg-id AANLkTi=Wp8J2w3eSqZLURETM2NA1wKWC9wswWqpTAsud@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch (for 9.1) string functions  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Список pgsql-hackers
Hello

2010/7/23 Itagaki Takahiro <itagaki.takahiro@gmail.com>:
> I'm reviewing contrib part of the string functions patch.
>
> I found an issue in sprintf() to print integer values. In this case,
> 'l' (for long type) is used on *all* platforms. For example,
>  SELECT sprintf('%d', 10);
> internally uses
>  appendStringInfo('%ld', (int64) 10)
>
> But there are some platform that requires to use %lld for int64 format, probably
> on Windows. That's why we have INT64_FORMAT macro. sprintf() needs to be
> adjusted to use INT64_FORMAT or similar portable codes.

ok, I'll look on it

>
> Other portion of the patch seems to be OK for me,
> unless you have still some idea to extend the feature.
>
> 2010/7/17 Pavel Stehule <pavel.stehule@gmail.com>:
>> I have a one idea nonstandard enhancing of sprintf - relatie often job
>> is a quoting in PostgreSQL. So sprintf should have a special formats
>> for quoted values. What do you think about
>>
>> %lq ... literal quoted
>> %iq ... ident quoted
>
> They save some keyboard types to write quote_literal() and quote_ident(), right?
> They seem to be useful and reasonable for me. One comment is that you might
> want to print NULL values as "NULL" instead of "<NULL>" in such cases.
>

yes, it is good note

Thank You very much

Regards

Pavel Stehule

> --
> Itagaki Takahiro
>


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

Предыдущее
От: Joseph Adams
Дата:
Сообщение: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)
Следующее
От: zb@cybertec.at
Дата:
Сообщение: Re: lock_timeout GUC patch - Review