From: | Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PostgreSQL Developer Best Practices |
Date: | 2015-08-22 15:46:07 |
Message-ID: | 20150822154607.GD7410@hermes.hilbert.loc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Aug 22, 2015 at 11:15:07AM -0400, Melvin Davidson wrote:
> PostgreSQL Developer Best Practices
>
> 1. Prefix ALL literals with an Escape
> EG: SELECT E'This is a \'quoted literal \'';
> SELECT E'This is an unquoted literal';
>
> Doing so will prevent the annoying "WARNING: nonstandard use of escape in a string literal"
This is certainly not Best Practice as the warning is
annoying for a reason.
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.
> Good example:
> CREATE TABLE accounts
> ( accout_id bigint NOT NULL ,
Typo.
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
From | Date | Subject | |
---|---|---|---|
Next Message | Melvin Davidson | 2015-08-22 16:02:56 | Re: PostgreSQL Developer Best Practices |
Previous Message | Tom Lane | 2015-08-22 15:43:48 | Re: How to use record variable with non-null domain in plpgsql |