Add new column

Поиск
Список
Период
Сортировка
От Rafal Kedziorski
Тема Add new column
Дата
Msg-id 6.2.3.4.0.20050720104139.01e0e370@polonium.de
обсуждение исходный текст
Ответы Re: Add new column  (Dawid Kuroczko <qnex42@gmail.com>)
Список pgsql-admin
Hi,

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
NEXTVAL('abo_product_2_user_seq'),
   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,
Rafal


В списке pgsql-admin по дате отправления:

Предыдущее
От: Tsirkin Evgeny
Дата:
Сообщение: Re: can not start the postgresql, i use gentoo
Следующее
От: Dawid Kuroczko
Дата:
Сообщение: Re: Add new column