Re: PostgreSQL Developer Best Practices
От | Melvin Davidson |
---|---|
Тема | Re: PostgreSQL Developer Best Practices |
Дата | |
Msg-id | CANu8Fiz5W6+b3YqPzOQc+zDHrpWahbKxHJiyDE+KXDhCxP3MVA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PostgreSQL Developer Best Practices (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: PostgreSQL Developer Best Practices
Re: PostgreSQL Developer Best Practices Re: PostgreSQL Developer Best Practices |
Список | pgsql-general |
Tom,
Thank you for pointing out "run with standard_conforming_strings = ON"..Therefore, I am trying to educate the developers in the proper method of escaping strings,
instead of loading up the error log with annoying warnings.
On Sat, Aug 22, 2015 at 1:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Melvin Davidson <melvin6925@gmail.com> writes:
>> Best Practice would rather be something along the lines:
>>>> Avoid coding in a way that triggers "WARNING:
>>>> nonstandard use of escape in a string literal". If you
>>>> cannot comply with this rule document your reasons.
> Thanks for the suggestion. For the past few months I've been dealing with
> an error log that is filled with these warnings simply because
> the developers do not comprehend how to use ( or the requirement to use)
> an escape clause.
IMO best practice in this area is "run with standard_conforming_strings = ON".
If you're seeing this warning at all, it's because you aren't doing that,
which means your code is unnecessarily unportable to other DBMSes.
Adopting a coding policy of always using E'' would make that worse.
regards, tom lane
--
Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.

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