problems with nextval

Поиск
Список
Период
Сортировка
От Patricia Yábar
Тема problems with nextval
Дата
Msg-id 3E018DCE.9215A996@unica.edu
обсуждение исходный текст
Список pgsql-php
Hello,
firsts at all sorry for my english and I hope write well.

I create a table using the instruction:

$q=pg_exec($conn,"create table xxx as select codi,
telephone,netxval('name_sequence') as id order by codi,telephone");
and when I list the table the value of nextval is incorrect.
For example two registers sequentially  that I saw when i
proved only the select  was create with the value of netxval change.
With out netxval the sequence is correct
I saw in select with out netxval
name:  telephone

John   123
John   456

was create with netxval
name   telephone      id (value of netxval)
John    456              1
John    123              2

Then I create only the table and then fill the values. making a
separated query for netxval and the registers was good.
Mi conclusion is, that using netxval in this cases is not good but I
want to know if I'm right or there are  others solutions that I can use
when I want to this.
Thanks.





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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: getting table names
Следующее
От: Jesus Rios
Дата:
Сообщение: has anyone a good php-postgresql tutorial????????????