Re: Primary Key

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Eduardo V(dot) Rodríguez <evazquez(at)insys-corp(dot)com(dot)mx>
Cc: "Postgres (E-mail)" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Primary Key
Date: 2004-06-16 19:13:00
Message-ID: 20040616191300.GA23786@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Jun 14, 2004 at 19:17:37 -0500,
"Eduardo V. Rodríguez" <evazquez(at)insys-corp(dot)com(dot)mx> wrote:
>
> But I pretend that automatically when I made an INSERT INTO table (month,
> day, time) values (A,B,C) the primary key update his value increasing by one
>
>
> I dont know how to do this, Iam using Postgres 7.4 with PgAdminIII

Depending on what you really want sequences might be the solution.
Sequences really only provide you with unique values. If you really need
the values not have any gaps in the numbers then you will need to do
more work (especially if you will be deleting rows).

In response to

  • Primary Key at 2004-06-15 00:17:37 from Eduardo V. Rodríguez

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Guerin 2004-06-16 19:29:48 Re: page x is unitialized
Previous Message Eduardo V. Rodríguez 2004-06-16 19:12:40 Re: Primary Key