Re: Using nextval(seq) in more than one column

Поиск
Список
Период
Сортировка
От Nis Jørgensen
Тема Re: Using nextval(seq) in more than one column
Дата
Msg-id feir2f$b0n$1@sea.gmane.org
обсуждение исходный текст
Ответ на Using nextval(seq) in more than one column  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-novice
Sean Davis skrev:
> I am trying to design some tables that have keys that look like:
>
> ASDF-####
>
> where #### should be derived from a sequence.  However, I would like the
> primary key to be an integer for speed of indexing, etc.  I don't see a
> way using standard DDL followed by inserts to have the #### be the same
> number as the integer primary key.  Is that the case?

What do you mean by "key"? Normally this word indicates something you
use to look up data by. In that case you will probably want an index on
it. So your indexing will be slower, not faster.

Nis

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

Предыдущее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Using nextval(seq) in more than one column
Следующее
От: Sean Davis
Дата:
Сообщение: Re: Using nextval(seq) in more than one column