| From: | Patricia Yábar <pyabar(at)unica(dot)edu> |
|---|---|
| To: | pgsql-php(at)postgresql(dot)org |
| Subject: | problems with nextval |
| Date: | 2002-12-19 09:13:50 |
| Message-ID: | 3E018DCE.9215A996@unica.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jesus Rios | 2002-12-19 19:31:04 | has anyone a good php-postgresql tutorial???????????? |
| Previous Message | Thorsten Haude | 2002-12-18 22:55:40 | Re: pg_fetch_array() |