Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group