Re: primary key generation - Mailing list pgsql-general

From Chris Albertson
Subject Re: primary key generation
Date
Msg-id 20011211222703.13732.qmail@web14704.mail.yahoo.com
Whole thread Raw
In response to primary key generation  ("Ned Matson" <ned@go.com>)
List pgsql-general
Here is an example:

CREATE SEQUENCE format_id_count;
CREATE TABLE format (
    FOREIGN KEY(vehicle_id) REFERENCES vehicle(vehicle_id),

    format_id                       INTEGER     PRIMARY KEY
                                                DEFAULT
NEXTVAL('format_id_count
'),
    vehicle_id                      INTEGER,

    format_type                     VARCHAR(11),
    description                     VARCHAR(31),
.......

--- Ned Matson <ned@go.com> wrote:
> Does postgres have any built-in methods for auto-generating unique
> integer
> primary keys or is managing this task the responsibility of the user?
>
> Thanks in advance...
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


=====
Chris Albertson
  Home:   310-376-1029  chrisalbertson90278@yahoo.com
  Cell:   310-990-7550
  Office: 310-336-5189  Christopher.J.Albertson@aero.org

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

pgsql-general by date:

Previous
From: Chris Albertson
Date:
Subject: Re: Problem with indexes
Next
From:
Date:
Subject: 7.1.3 XLogWrite Error