PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly - Mailing list pgsql-sql

<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Dear friends,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I have table</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">MD_CUSTOMER</span></font><p class="MsoNormal"><b><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial;font-weight:bold">MD_CUSTOMERIDPK</span></font></b><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">integer primary key</span></font><p class="MsoNormal"><b><font face="Arial"
size="2"><spanstyle="font-size:10.0pt; 
font-family:Arial;font-weight:bold">NAME                           </span></font></b><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">varchar</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">But my primary key is not in correct order like</span></font><p class="MsoNormal"><b><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial;font-weight:bold">MD_CUSTOMER</span></font></b><p class="MsoNormal"><font face="Times New Roman"
size="3"><spanstyle="font-size: 
12.0pt">MD_CUSTOMERIDPK                     NAME</span></font><p class="MsoNormal"
style="margin-left:2.75in;text-indent:-2.5in;mso-list:l5level1 lfo5"><font face="Times New Roman" size="3"><span
style="font-size:12.0pt"><spanstyle="mso-list:Ignore">10<font face="Times New Roman" size="1"><span style="font:7.0pt
"TimesNew
Roman"">                                                                                                               
</span></font></span></span></font>ANDI<pclass="MsoNormal" style="margin-left:2.75in;text-indent:-2.5in;mso-list:l4
level1lfo6"><font face="Times New Roman" size="3"><span style="font-size:12.0pt"><span style="mso-list:Ignore">33<font
face="TimesNew Roman" size="1"><span style="font:7.0pt "Times New
Roman"">                                                                                                               
</span></font></span></span></font>TESTER<pclass="MsoNormal" style="margin-left:.25in"><font face="Times New Roman"
size="3"><spanstyle="font-size:12.0pt">100                                                           
KKK</span></font><pclass="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 
12.0pt"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:
12.0pt">, so I want to make other primary key to generate sequences 1, 2, 3, … and in MS SQL SERVER
2005</span></font><pclass="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 
12.0pt">I can with Rank() function , but in Postgres how ?</span></font><p class="MsoNormal"><font face="Times New
Roman"size="3"><span style="font-size: 
12.0pt"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:
12.0pt">PLEASE any one can help me, I am really appreciate.</span></font><p class="MsoNormal"><font face="Times New
Roman"size="3"><span style="font-size: 
12.0pt"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:
12.0pt">Best regards</span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:
12.0pt"> </span></font><p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size:
12.0pt">Andi kusnadi</span></font></div>

pgsql-sql by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: (Ab)Using schemas and inheritance
Next
From: Andrew Sullivan
Date:
Subject: Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly