Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 52A4C4766B4 for ; Thu, 19 Dec 2002 04:06:53 -0500 (EST) Received: from av.unica.edu (www.unica.edu [217.172.65.35]) by postgresql.org (Postfix) with ESMTP id 62E1D476D28 for ; Thu, 19 Dec 2002 04:06:11 -0500 (EST) Received: from localhost (av.unica.edu [127.0.0.1]) by av.unica.edu (Postfix) with ESMTP id 707CB144183 for ; Thu, 19 Dec 2002 11:18:06 +0000 (GMT) Received: from alpha.unica.edu (unknown [172.20.1.1]) by av.unica.edu (Postfix) with SMTP id 18A61144182 for ; Thu, 19 Dec 2002 11:18:06 +0000 (GMT) Received: from unica.edu (unknown [172.20.2.3]) by alpha.unica.edu (Postfix) with ESMTP id 3E4258B3E4 for ; Thu, 19 Dec 2002 10:05:16 +0100 (CET) Message-ID: <3E018DCE.9215A996@unica.edu> Date: Thu, 19 Dec 2002 10:13:50 +0100 From: Patricia =?iso-8859-1?Q?Y=E1bar?= Organization: Universitat Internacional de Catalunya X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en,es-ES MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: problems with nextval Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS snapshot-20010714 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/48 X-Sequence-Number: 1723 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.