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

Add new column

From: Rafal Kedziorski <rafcio(at)polonium(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: Add new column
Date: 2005-07-20 08:49:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

I wan't add new column to this table:

CREATE SEQUENCE abo_product_2_user_seq;

CREATE TABLE abo_product_2_user (
   abo_product_2_user_id  BIGINT      NOT NULL DEFAULT 
   abo_product_id         SMALLINT    NOT NULL,
   user_id                BIGINT      NOT NULL,
   valid_from             TIMESTAMP   NOT NULL,
   valid_to               TIMESTAMP,
   debit_entry            VARCHAR(12) NOT NULL,
   PRIMARY KEY (abo_product_2_user_id),
   --INDEX (abo_product_id),
   --INDEX (user_id),
   FOREIGN KEY (abo_product_id)
         REFERENCES abo_product (abo_product_id),
   FOREIGN KEY (user_id)
         REFERENCES users (user_id)

But PostgreSQL 8.0.3 adds the new column at the end. I want add this 
new column between user_id and valid_from.

Best Regards,


pgsql-admin by date

Next:From: Dawid KuroczkoDate: 2005-07-20 09:04:15
Subject: Re: Add new column
Previous:From: Tsirkin EvgenyDate: 2005-07-20 07:55:50
Subject: Re: can not start the postgresql, i use gentoo

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