From: Seth Banks <seth@subimage.com>
To: pgsql-sql@postgreSQL.org
Subject: Default sequence values
Date: Sat, 26 Feb 2000 23:45:36 -0800
Message-ID: <NOEPJACOBMIOEOLHKIODIEFLCBAA.seth@subimage.com> (raw)
I'm getting errors in pgsql when I try to run this create table statement
past...Could someone help me out here? I think it's the default value of
company_id that's erroring out. Any help is appreciated.
CREATE SEQUENCE company_id_seq;
CREATE TABLE company (
company_id int4 PRIMARY KEY DEFAULT nextval(company_id_seq),
parent_id int4 NULL,
name text NOT NULL,
address_1 text NULL,
address_2 text NULL,
fax text NULL,
city text NULL,
state_province text NULL,
zip text NULL,
country text NULL,
description text NULL,
stock_symbol text NULL
);
CREATE INDEX name_idx on company (name);
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: seth@subimage.com
Subject: Re: Default sequence values
In-Reply-To: <NOEPJACOBMIOEOLHKIODIEFLCBAA.seth@subimage.com>
References: <NOEPJACOBMIOEOLHKIODIEFLCBAA.seth@subimage.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox