Re: auto-increment integer field for each row

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lonni J Friedman <netllama(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: auto-increment integer field for each row
Date: 2009-12-03 22:56:06
Message-ID: 16418.1259880966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Lonni J Friedman <netllama(at)gmail(dot)com> writes:
> I tried to use the trigger example here, but it silently fails to work:
> http://archives.postgresql.org/pgsql-sql/2000-02/msg00147.php

That example seems to be lacking a CREATE TRIGGER command, so
there's nothing telling the system to call the function.
It never worked as given --- read the whole thread.

The only really out-of-date part of it is that nowadays
"returns trigger" is preferred to "returns opaque".
But you need CREATE TRIGGER.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Lonni J Friedman 2009-12-03 23:22:52 Re: auto-increment integer field for each row
Previous Message Lonni J Friedman 2009-12-03 22:39:58 auto-increment integer field for each row