Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A06ED9FB2E7 for ; Wed, 18 Oct 2006 10:24:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 81151-01 for ; Wed, 18 Oct 2006 13:23:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.206]) by postgresql.org (Postfix) with ESMTP id E99189FB289 for ; Wed, 18 Oct 2006 10:23:57 -0300 (ADT) Received: by nz-out-0102.google.com with SMTP id i11so95155nzi for ; Wed, 18 Oct 2006 06:23:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=V540Cm1peNq1kBOg/OdlvxhFvlY1bnMNwXY5KSm2ot8xFKKUTHbBOP9aOwpEZhtQJGXr42Q29hsPUxFCM2NWitCNo1DhHCFRCdTc8gBDk5mS3GSzb57XwicW3U6w2+6wFMy3UecyEG8GWSFzMAad0Sj8ulxdXdBF+ACv3jfMdGY= Received: by 10.65.251.1 with SMTP id d1mr14415909qbs; Wed, 18 Oct 2006 06:23:46 -0700 (PDT) Received: by 10.65.160.18 with HTTP; Wed, 18 Oct 2006 06:23:46 -0700 (PDT) Message-ID: Date: Wed, 18 Oct 2006 18:53:46 +0530 From: "Indira Muthuswamy" To: pgsql-hackers@postgresql.org Subject: Bug? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_82783_14525476.1161177826819" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.2 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200610/956 X-Sequence-Number: 92853 ------=_Part_82783_14525476.1161177826819 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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? Thanks in advance, Regards, m.Indira ------=_Part_82783_14525476.1161177826819 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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?
 
Thanks in advance,
Regards,
m.Indira
------=_Part_82783_14525476.1161177826819--