From phillip.smith@weatherbeeta.com.au Tue Mar 20 02:20:07 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A39039FB921 for ; Mon, 19 Mar 2007 23:20:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 27404-04 for ; Mon, 19 Mar 2007 23:20:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from weatherbeeta.com.au (218-214-212-153.people.net.au [218.214.212.153]) by postgresql.org (Postfix) with SMTP id 4A7439FB8D9 for ; Mon, 19 Mar 2007 23:20:02 -0300 (ADT) Received: (qmail 2993 invoked from network); 20 Mar 2007 02:20:01 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetaau1;be12e78d7d4e19f331c06e068d88b0be; Received: from mail.weatherbeeta.com.au (10.10.0.2) by network-box.weatherbeeta.com.au with SMTP; 20 Mar 2007 02:20:01 -0000 Received: (qmail 16888 invoked by uid 1166); 20 Mar 2007 13:20:00 +1100 Received: from 172.20.1.142 by mail.weatherbeeta.com.au (envelope-from , uid 1165) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.6/2315. perlscan: 1.25-st-qms. Clear:RC:1(172.20.1.142):. Processed in 0.309148 secs); 20 Mar 2007 02:20:00 -0000 X-Antivirus-mail.weatherbeeta.com.au-Mail-From: phillip.smith@weatherbeeta.com.au via mail.weatherbeeta.com.au X-Antivirus-mail.weatherbeeta.com.au: 1.25-st-qms (Clear:RC:1(172.20.1.142):. Processed in 0.309148 secs Process 16882) Received: from unknown (HELO ?172.20.1.142?) (phillip.smith@weatherbeeta.com.au@172.20.1.142) by mail.weatherbeeta.com.au with SMTP; 20 Mar 2007 13:19:58 +1100 Subject: Re: how to create field auto increas value From: Phillip Smith To: "gunartha.nyoman" Cc: pgsql-admin@postgresql.org In-Reply-To: <001901c76a9a$5f6ff8b0$fd0010b2@idas> References: <001901c76a9a$5f6ff8b0$fd0010b2@idas> Content-Type: multipart/signed; micalg=sha1; protocol="application/x-pkcs7-signature"; boundary="=-kM9OOqRVu1hNnl1kXYUM" Organization: Weatherbeeta P/L Date: Tue, 20 Mar 2007 13:19:51 +1100 Message-Id: <1174357191.10466.9.camel@it-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 X-Scanned-By-wbeetaau1: Virus scan performed by network-box X-Scanned-By-wbeetaau1: Scanner file id is wbeetaau1-1174357201.194-2981-000 X-Scanned-By-wbeetaau1: No known viruses found in message (received+scanned in 0.05/0.10 secs) X-Scanned-By-wbeetaau1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/127 X-Sequence-Number: 24951 --=-kM9OOqRVu1hNnl1kXYUM Content-Type: multipart/alternative; boundary="=-ZJvfePDPTf7MJfe42w3r" --=-ZJvfePDPTf7MJfe42w3r Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Look at the "serial" data type in the documentation. ~p On Tue, 2007-03-20 at 09:49 +0700, gunartha.nyoman wrote: > Dear All, > =20 > I am trying to create table which have one field auto increas value > like autonumber in ms access. > My question is how to create this auto increas field. > =20 > Thank a lot for your attention >=20 > Regards, > Nyoman/Bali >=20 > =20 > =20 --=-ZJvfePDPTf7MJfe42w3r Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Look at the "serial" data type in the documentation.
~p

On Tue, 2007-03-20 at 09:49 +0700, gunartha.nyoman wrote:
Dear All,
 
I am trying to create table wh= ich have one field auto increas value like autonumber in ms access.<= /FONT>
My question is how to create t= his auto increas field.
 
Thank a lot for your attention=

Regards,
Nyoman/Bali

 


--=-ZJvfePDPTf7MJfe42w3r-- --=-kM9OOqRVu1hNnl1kXYUM Content-Type: application/x-pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgU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sYITq726jTlEBpbNU1341YheILcIRk13iSx0x1G/11f ZU8xggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGlu ZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBD QQIQKAYvODh++7LBpJQ+M6+lujAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEH ATAcBgkqhkiG9w0BCQUxDxcNMDcwMzIwMDIxOTUxWjAjBgkqhkiG9w0BCQQxFgQUlpWtOCtF/x9W lwJ7Vvt+7zffXhUwDQYJKoZIhvcNAQEBBQAEggEAZuuIHMB6SqdQfvzx0V8oI9SicNb2oD+JTotO Cqti/NgQ6+EEflp1Y5Ytnofx0tZIij3u5b3caPxcnngoCHJBOyN0lvD5StmTJAxLUml6BH0JD5hh ArQNXMGc142ZrQf5+NYDgMawXskZGC07T6tvcvxKg6250TRpfOYErpc9oOiq14z9e/CxBlEBX2CZ pSiZL29hYA7Fyfy6L5PjoBGLXEcQlqQUTqYEUm8NAXZr0ZpMTzxxI61rIqvrZKMdzmN9rGhDENdG 92xbbstg61XWuc/rtN8mSLeZohCGk7zc3VQ52f4nh+M8GlR4HQL8EGyzUhJhYBLQfD3TaWC2ybjg YgAAAAAAAA== --=-kM9OOqRVu1hNnl1kXYUM-- From jd@commandprompt.com Tue Mar 20 02:28:48 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B7D889FB2C6 for ; Mon, 19 Mar 2007 23:28:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 13785-03 for ; Mon, 19 Mar 2007 23:28:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 7CED79FB2A6 for ; Mon, 19 Mar 2007 23:28:43 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.embarqhsd.net [67.76.146.141]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l2K2Si10006592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Mar 2007 19:28:45 -0700 Message-ID: <45FF4715.4000305@commandprompt.com> Date: Mon, 19 Mar 2007 19:29:41 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: "gunartha.nyoman" CC: pgsql-admin@postgresql.org Subject: Re: how to create field auto increas value References: <001901c76a9a$5f6ff8b0$fd0010b2@idas> In-Reply-To: <001901c76a9a$5f6ff8b0$fd0010b2@idas> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.5/2865/Sun Mar 18 08:27:48 2007 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Mon, 19 Mar 2007 19:28:45 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/128 X-Sequence-Number: 24952 gunartha.nyoman wrote: > Dear All, > > I am trying to create table which have one field auto increas value like autonumber in ms access. > My question is how to create this auto increas field. create table foo (id serial); also see currval(), nextval() Sincerely, Joshua D. Drake > > Thank a lot for your attention > > Regards, > Nyoman/Bali > > > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/ Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL Replication: http://www.commandprompt.com/products/ From gunartha.nyoman@ptjas.co.id Tue Mar 20 01:55:35 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 584619FB552 for ; Mon, 19 Mar 2007 22:55:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 49277-06 for ; Mon, 19 Mar 2007 22:55:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.ptjas.co.id (unknown [202.152.3.67]) by postgresql.org (Postfix) with ESMTP id 2F3379FB2C2 for ; Mon, 19 Mar 2007 22:55:30 -0300 (ADT) Received: from [178.16.0.253] (helo=idas) by kurawa.ptjas.co.id with smtp (Exim 4.43) id 1HTTf6-00076u-Ad for pgsql-admin@postgresql.org; Tue, 20 Mar 2007 09:01:21 +0700 Message-ID: <001901c76a9a$5f6ff8b0$fd0010b2@idas> Reply-To: "gunartha.nyoman" From: "gunartha.nyoman" To: Subject: how to create field auto increas value Date: Tue, 20 Mar 2007 09:49:22 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0016_01C76AD5.098DBA50" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.573 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_MESSAGE, RCVD_IN_WHOIS_BOGONS X-Spam-Level: ** X-Archive-Number: 200703/126 X-Sequence-Number: 24950 This is a multi-part message in MIME format. ------=_NextPart_000_0016_01C76AD5.098DBA50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear All, I am trying to create table which have one field auto increas value like = autonumber in ms access. My question is how to create this auto increas field. Thank a lot for your attention Regards, Nyoman/Bali ------=_NextPart_000_0016_01C76AD5.098DBA50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear All,
 
I am trying to create table which have = one field=20 auto increas value like autonumber in ms access.
My question is how to create this auto = increas=20 field.
 
Thank a lot for your = attention

Regards,
Nyoman/Bali
 
 
------=_NextPart_000_0016_01C76AD5.098DBA50--