Re: indexing

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: indexing
Дата
Msg-id Pine.BSF.4.21.0102260848420.31970-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на indexing  (si <s@remail.net>)
Список pgsql-admin
You can use the serial type to make the id,
although serial only guarantees uniqueness
not sequential numbers. something like:

create table foo (
id serial primary key,
name text
);


On Mon, 26 Feb 2001, si wrote:

> Hi,
>
> I am new to postgresql, Please can you guide me:
>
> I have created a table and I would like all the entries to be indexed with a number when the data is entered into the
database,hence giving it a new id, every time some data is entered. 
>
> e.g.
>
> I.D.    |   Name
> 1       |   Jack
> 2       |   Jill
>
>
> Does pgsql do this automatically? or do I have to create a seprate ID field like above, and check the database each
timethe data is entered and find out the highest number then increment it by 1 and then enter the data with the
incrementednumber. 
>
> If it automatically indexes the names when they are entered in to the database, Please can you show me how to find
thisindex. 
>
> Thanks,
> Si
>
> _____________________________________________________________
> Pick up your email anywhere in the world ---> http://www.remail.net
>


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

Предыдущее
От: si
Дата:
Сообщение: indexing
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: not use pg_dump & pg_dumpall