Re: Insert zero to auto increment serial column

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
Cc: loc <c320sky(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Insert zero to auto increment serial column
Date: 2014-04-02 13:24:39
Message-ID: CAOR=d=1WaSovA1T3H-04vEiavtDqj=RTyddouWcYPc7WFSHd4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 2, 2014 at 6:53 AM, Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com> wrote:
> Will a rule work?
> http://www.postgresql.org/docs/9.3/static/sql-createrule.html

There are a couple of issues you face if you use a rule, copy commands
ignore rules, and rules are slower.

Triggers are almost always better here and really aren't that hard to write.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-04-02 13:46:57 Re: Insert zero to auto increment serial column
Previous Message Jayadevan M 2014-04-02 12:53:46 Re: Insert zero to auto increment serial column