Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1C73A632320 for ; Sun, 26 Jul 2009 14:29:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 39821-08 for ; Sun, 26 Jul 2009 17:28:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail14.svc.cra.dublin.eircom.net (mail14.svc.cra.dublin.eircom.net [159.134.118.30]) by mail.postgresql.org (Postfix) with SMTP id 7F6806322B4 for ; Sun, 26 Jul 2009 14:28:49 -0300 (ADT) Received: (qmail 71052 messnum 2726230 invoked from network[86.40.235.147/86-40-235-147-dynamic.b-ras3.mvw.galway.eircom.net]); 26 Jul 2009 17:28:46 -0000 Received: from 86-40-235-147-dynamic.b-ras3.mvw.galway.eircom.net (HELO ?127.0.0.1?) (86.40.235.147) by mail14.svc.cra.dublin.eircom.net (qp 71052) with SMTP; 26 Jul 2009 17:28:46 -0000 Message-ID: <4A6C924E.70407@iol.ie> Date: Sun, 26 Jul 2009 18:28:46 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Clemens Eisserer CC: pgsql-general@postgresql.org Subject: Re: Implicit sequence with start value? References: <194f62550907260910x5a286204g3280e4eb5e583cca@mail.gmail.com> <27956.1248625117@sss.pgh.pa.us> <194f62550907261020p569d3440s17f4edbfd88b0ba4@mail.gmail.com> In-Reply-To: <194f62550907261020p569d3440s17f4edbfd88b0ba4@mail.gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 090725-0, 25/07/2009), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-10 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/1078 X-Sequence-Number: 150841 On 26/07/2009 18:20, Clemens Eisserer wrote: > What still puzzles me is how to get the sequence value applied. > MySQL's auto_increment simply ignores whatever value is supplied to > it, however postgres seems to insert the value instead of the next > sequence value, if one is supplied: That's because type SERIAL sets the column's *default* value to call nextval() - so if you supply an explicit value, it will use that instead. Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------