Re: Referencing serial col's sequence for insert

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Anil Menon <gakmenon(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Referencing serial col's sequence for insert
Date: 2014-07-24 17:05:17
Message-ID: CA+bJJbwX8eDAh-dRSzTrW9i8ugs4oDz5FpGfhETG6yY70PZbCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Anil:

On Wed, Jul 23, 2014 at 11:34 PM, Anil Menon <gakmenon(at)gmail(dot)com> wrote:
...
> . It's that itch to drink deep from the fountain of knowledge.

Beware of hyponatremia, and keep in mind it can change in the future.
But you'll surely learn a lot.

> I really do like
> Laurenz Albe's advice of using WITH() AS which seems to be the best practice
> I can ask the developers to follow as it eliminates a lot of uncertainties
> and db specific behavior - and seems like a best practice even for other
> DBs.

Yep, that is the kind of thing I use in production too. These kind of
queries are predictable and easy to build and test incrementally.

Regards.

Francisco Olarte.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-07-24 17:12:05 Re: tab_to_sting
Previous Message Adrian Klaver 2014-07-24 15:14:48 Re: tab_to_sting