Thread: MINUS & ROWNUM in PostGres
Hi, We are in the process of migrating of our application from Oracle to PostGreSQL. we are facing a few problems with PL/SQL Code.. 1) Do we have a replacement in PostGres for MINUS operator of Oracle . 2 Also I need to find an alternative for ROWNUM in oracle.. Can anyone help .. Regards Jomon
> 1) Do we have a replacement in PostGres for MINUS operator of Oracle . I believe MINUS is non-standard word for EXCEPT, correct? > 2 Also I need to find an alternative for ROWNUM in oracle.. If you are looking for a unique identifier, try using the OID.
On Mon, 2003-09-08 at 09:44, Jomon Skariah wrote: > Hi, > > Do we have any replacement for REPLACE() of Oracle in PostGres? What does replace() do? String replacement? http://www.postgresql.org/docs/7.3/interactive/functions-string.html replace(string text, from text, to text)
> The problem is we are using PostGres 7.1.In this version REPLACE() is not > available. It sounded like you were just starting to work on the change over. I highly suggest upgrading to 7.3 at the very least, 7.4 if you're going to be a few months prior to going to production. A ton of good work has been put into PostgreSQL in the last couple of years. Anyway, you'll need to write your own replace() if you stick with that release.
On Thu, 4 Sep 2003, Rod Taylor wrote: > > 2 Also I need to find an alternative for ROWNUM in oracle.. > > If you are looking for a unique identifier, try using the OID. > ROWID is oracle's unique identifier, ROWNUM is the row number in a query result. In the past it has been suggested that ROWNUM could be replaced by the nextval of a temporary sequence. Kris Jurka
Hi, Do we have any replacement for REPLACE() of Oracle in PostGres? I know we can function to do same job. Regards Jomon -----Original Message----- From: Kris Jurka [mailto:books@ejurka.com] Sent: Monday, September 08, 2003 1:52 PM To: Rod Taylor Cc: Jomon Skariah; pgsql-sql@postgresql.org Subject: Re: [SQL] MINUS & ROWNUM in PostGres On Thu, 4 Sep 2003, Rod Taylor wrote: > > 2 Also I need to find an alternative for ROWNUM in oracle.. > > If you are looking for a unique identifier, try using the OID. > ROWID is oracle's unique identifier, ROWNUM is the row number in a query result. In the past it has been suggested that ROWNUM could be replaced by the nextval of a temporary sequence. Kris Jurka
Hi, Thanx for your reply. The problem is we are using PostGres 7.1.In this version REPLACE() is not available. Regards Jomon -----Original Message----- From: Rod Taylor [mailto:rbt@rbt.ca] Sent: Monday, September 08, 2003 7:41 PM To: Jomon Skariah Cc: Kris Jurka; pgsql-sql@postgresql.org Subject: RE: [SQL] MINUS & ROWNUM in PostGres On Mon, 2003-09-08 at 09:44, Jomon Skariah wrote: > Hi, > > Do we have any replacement for REPLACE() of Oracle in PostGres? What does replace() do? String replacement? http://www.postgresql.org/docs/7.3/interactive/functions-string.html replace(string text, from text, to text)
> Anyway, you'll need to write your own replace() if you stick with that > release. > You can use this replace function, if you stick with that release. regards, bhuvaneswaran