Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BD40F9FB2E0 for ; Wed, 18 Oct 2006 10:32:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 02428-05 for ; Wed, 18 Oct 2006 10:32:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from community1.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 1E48F9FA4AD for ; Wed, 18 Oct 2006 10:31:59 -0300 (ADT) Received: from [192.168.27.150] ([12.38.10.44]) (authenticated bits=0) by community1.commandprompt.com (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id k9IDVtGF004244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 18 Oct 2006 06:31:57 -0700 Message-ID: <45362CCA.8060000@dunslane.net> Date: Wed, 18 Oct 2006 09:31:54 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.6) Gecko/20060804 Fedora/1.0.4-0.5.1.fc5 SeaMonkey/1.0.4 MIME-Version: 1.0 To: Indira Muthuswamy CC: pgsql-hackers@postgresql.org Subject: Re: Bug? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.146 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/957 X-Sequence-Number: 92854 Indira Muthuswamy wrote: > Hai, > > I have encountered a problem with PostgreSQL.I have created a table > 'tab1' with a column 'a' with serial type.I entered 20 records into > the table.So the query > select max(a) from tab1; > returned 20.When I tried the same query after the command > truncate table tab1; > I found that the output of the first query as > > max > ----- > > (1 row) > > When I tried to insert a new row into the table tab1 I found that the > value at column a incremented to the value 21. > But I heard from my friends that the value of the serial column gets > decremented whenever we issue the 'truncate table' command (in MS SQL > SERVER).Is the concept same with PostgreSQL or not?Can anyone clarify > me on this? > Sure. You heard wrong about postgres. Please do not ask questions like this on the -hackers list - this should have gone to pgsql-general. The hackers list is for postgresql development discussions only. cheers andrew