Re: workaround for missing ROWNUM feature with the help of GUC variables - Mailing list pgsql-sql

From Andreas Joseph Krogh
Subject Re: workaround for missing ROWNUM feature with the help of GUC variables
Date
Msg-id 4C59C89A.7070401@officenet.no
Whole thread Raw
In response to workaround for missing ROWNUM feature with the help of GUC variables  ("Marc Mamin" <M.Mamin@intershop.de>)
Responses Re: workaround for missing ROWNUM feature with the help of GUC variables  ("Marc Mamin" <M.Mamin@intershop.de>)
List pgsql-sql
On 08/04/2010 12:35 PM, Marc Mamin wrote: <blockquote
cite="mid:C4DAC901169B624F933534A26ED7DF31034BB74D@JENMAIL01.ad.intershop.net"type="cite"><style>
 
<!--/* Font Definitions */@font-face{font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}/* Style Definitions */p.MsoNormal, li.MsoNormal,
div.MsoNormal{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink{mso-style-priority:99;color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed{mso-style-priority:99;color:purple;text-decoration:underline;}
span.EmailStyle17{mso-style-type:personal-compose;font-family:"Calibri","sans-serif";color:windowtext;}
.MsoChpDefault{mso-style-type:export-only;}
@page Section1{size:612.0pt 792.0pt;margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1{page:Section1;}
--> </style><div class="Section1"><p class="MsoNormal"><span lang="EN-US">Hello,</span><p class="MsoNormal"><span
lang="EN-US"> </span><pclass="MsoNormal"><span lang="EN-US">here my two pence on this recurring thema.</span><p
class="MsoNormal"><spanlang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">(just a workaround)</span><br
/></div></blockquote><br/> I don't understand what you mean by missing ROWNUM feature, PG got this with
windows-functionsin 8.4:<br /><a class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/8.4/interactive/functions-window.html">http://www.postgresql.org/docs/8.4/interactive/functions-window.html</a><br
/><br/> Example:<br /> select username, row_number() over() from my_user_table;<br />   username   | row_number <br />
-------------+------------<br/>  admin       |          1<br />  everyone    |          2<br /><br /><pre
class="moz-signature"cols="72">-- 
 
Andreas Joseph Krogh <a class="moz-txt-link-rfc2396E"
href="mailto:andreak@officenet.no"><andreak@officenet.no></a>
Senior Software Developer / CTO
------------------------+---------------------------------------------+
OfficeNet AS            | The most difficult thing in the world is to |
Rosenholmveien 25       | know how to do a thing and to watch         |
1414 Trollåsen          | somebody else doing it wrong, without       |
NORWAY                  | comment.                                    |                       |
                   |
 
Tlf:    +47 24 15 38 90 |                                             |
Fax:    +47 24 15 38 91 |                                             |
Mobile: +47 909  56 963 |                                             |
------------------------+---------------------------------------------+
</pre>

pgsql-sql by date:

Previous
From: Justin Graf
Date:
Subject: Re: Domains, casts, and MS Access
Next
From: "Little, Douglas"
Date:
Subject: Delete rules