Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpxYS-0006Jh-4U for pgsql-performance@arkaria.postgresql.org; Mon, 20 Mar 2017 13:41:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cpxYR-0007nS-Fr for pgsql-performance@arkaria.postgresql.org; Mon, 20 Mar 2017 13:40:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cpxWd-0002BY-3o; Mon, 20 Mar 2017 13:39:07 +0000 Received: from mxgate02.infotech-enterprises.com ([110.76.160.160] helo=mxgate02.cyient.com) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cpxWT-0007SF-BY; Mon, 20 Mar 2017 13:39:05 +0000 X-IronPort-AV: E=Sophos;i="5.36,194,1486405800"; d="scan'208,217";a="48983384" Received: from unknown (HELO INFHYDEX10AHT.corp.infotech-enterprises.com) ([172.17.0.190]) by mxgate02.cyient.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Mar 2017 19:00:14 +0530 Received: from CYINMBX2.CORP.CYIENT.COM (172.17.4.162) by INFHYDEX10AHT.corp.infotech-enterprises.com (172.17.0.190) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 20 Mar 2017 19:08:51 +0530 Received: from CYINMBX4.CORP.CYIENT.COM (172.17.4.164) by CYINMBX2.CORP.CYIENT.COM (172.17.4.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.27; Mon, 20 Mar 2017 19:08:40 +0530 Received: from CYINMBX4.CORP.CYIENT.COM ([fe80::e40c:d4fe:9e0c:f465]) by CYINMBX4.CORP.CYIENT.COM ([fe80::e40c:d4fe:9e0c:f465%19]) with mapi id 15.01.0544.027; Mon, 20 Mar 2017 19:08:40 +0530 From: Dinesh Chandra 12108 To: "pgsql-performance-owner@postgresql.org" CC: "pgsql-performance@postgresql.org" Subject: Auto generate number in Postgres-9.1. Thread-Topic: Auto generate number in Postgres-9.1. Thread-Index: AdKhfwAfZEZINCnoSxGDchgEFLEA3Q== Date: Mon, 20 Mar 2017 13:38:40 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.4.81] Content-Type: multipart/alternative; boundary="_000_ab77f3e1c16540a09002740e283529c5cyientcom_" MIME-Version: 1.0 X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --_000_ab77f3e1c16540a09002740e283529c5cyientcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dear expert, I have to add one column "ID" in postgres table which will generate Auto I= ncremented = number . Example: Suppose I have five records and if I insert 1 new record It should auto gen= erate 6. If I truncate the same table and then again insert rows should start with 1= in "ID" column. Regards, Dinesh Chandra |Database administrator (Oracle/PostgreSQL)| Cyient Ltd. Noida. ________________________________ DISCLAIMER: This email message is for the sole use of the intended recipient(s) and may= contain confidential and privileged information. Any unauthorized review, = use, disclosure or distribution is prohibited. If you are not the intended = recipient, please contact the sender by reply email and destroy all copies = of the original message. Check all attachments for viruses before opening t= hem. All views or opinions presented in this e-mail are those of the author= and may not reflect the opinion of Cyient or those of our affiliates. --_000_ab77f3e1c16540a09002740e283529c5cyientcom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable


DISCLAIMER:

This email message is for the sole use of the intended recipient(s) and may= contain confidential and privileged information. Any unauthorized review, = use, disclosure or distribution is prohibited. If you are not the intended = recipient, please contact the sender by reply email and destroy all copies of the original message. Check all a= ttachments for viruses before opening them. All views or opinions presented= in this e-mail are those of the author and may not reflect the opinion of = Cyient or those of our affiliates.
--_000_ab77f3e1c16540a09002740e283529c5cyientcom_--