Re: [GENERAL] two serial fields within one table?

Поиск
Список
Период
Сортировка
От Charles Tassell
Тема Re: [GENERAL] two serial fields within one table?
Дата
Msg-id 4.1.19991012174655.00980380@mailer.isn.net
обсуждение исходный текст
Ответ на two serial fields within one table?  ("amy cheng" <amycq@hotmail.com>)
Список pgsql-general
I tried it here and it doesn't work for me either, but I was wondering why
you would want to do this anyway?  All you are doing is creating two fields
(schedid and eventid) that are going to contain the same value when a new
record is inserted.  If you are just using them to link to other tables
that have a serial type, use an int (which I believe is the actual type for
the sequence macro.)  If you are going to link to this table from two other
tables, why not just combine the two keys and link both of the other tables
to schedid?

At 04:31 PM 10/12/99, amy cheng wrote:
>hi, there,
>
>I use two serial type fields within one table, seems psql does not
>like it: it override the first one with the second one! Why? (seems to me
>quite often if I do not want to normize it too much) or
>something else?
>
>here is the table:
>
>create table tmpschedule
>(
>  schedid    serial,
>  addtime       datetime,
>  eventid       serial,
>  eventaddtime  datetime,
>  poll          int
>);
>
>
>thanks in advance!!!
>
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>************
>


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

Предыдущее
От: Yin-So Chen
Дата:
Сообщение: Re: [GENERAL] stored procedure revisited
Следующее
От: "Tim Joyce"
Дата:
Сообщение: trouble updating