[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

postgres



Hejsa

Jeg er ved at oprette en DB i postgress med 'psql'. Jeg får følgende
NOTICE, når jeg opretter en tabel med PRIMARY KEY:

shape_db=> CREATE SEQUENCE qd_id_seq INCREMENT BY 1;
CREATE SEQUENCE
shape_db=> CREATE TABLE qdisk (
shape_db(>   qd_id   INT NOT NULL PRIMARY KEY DEFAULT nextval('qd_id_seq'),
shape_db(>   qd_name VARCHAR(255) NOT NULL,
shape_db(>   qd_net VARCHAR(18) NOT NULL,
shape_db(>   qd_burst INT DEFAULT 0 NOT NULL,
shape_db(>   qd_cburst INT DEFAULT 0 NOT NULL,
shape_db(>   qd_perturb INT DEFAULT 4 NOT NULL,
shape_db(>   qd_prio INT DEFAULT 5 NOT NULL,
shape_db(>   qd_date TIMESTAMP DEFAULT now() NOT NULL,
shape_db(>   qd_param_1 VARCHAR(255) DEFAULT NULL,
shape_db(>   qd_param_2 VARCHAR(255) DEFAULT NULL,
shape_db(>   sh_id INT NOT NULL,
shape_db(>   ab_id INT NOT NULL,
shape_db(>   CONSTRAINT shape_net_exists
shape_db(>     FOREIGN KEY(sh_id) REFERENCES machine
shape_db(>     ON DELETE RESTRICT,
shape_db(>   CONSTRAINT abonnement_exists
shape_db(>     FOREIGN KEY(ab_id) REFERENCES machine
shape_db(>     ON DELETE RESTRICT
shape_db(> );
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"qdisk_pkey" for table "qdisk"
CREATE TABLE
shape_db=> 

Jeg mente at jeg selv havde styr på PK, men postgres opretter
tilsyneladende implicit selv en PK.
Skal jeg lade den gøre det? 
Hvis jeg selv mener at have styr på PK ;-) - Bruger postgres den så til noget? 

- Martin


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:26 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *