Search Postgresql Archives

Re: allow LIMIT in UPDATE and DELETE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Regarding Oracle's ROWNUM - since they have to use that instead of OFFSET
and LIMIT, that isn't much of an argument for the Oracle way.  When
converting queries into Oracle SQL, I always _really_ miss OFFSET and
LIMIT.  They are much easier to use than ROWNUM, especially with ORDER BY.

I think that more databases support OFFSET and LIMIT than ROWNUM (the
Oracle way).

Personally, I have never wanted a DELETE or UPDATE with LIMIT.  The one
time I did something similar in Oracle, I used partitions, and just dropped
or truncated the partition containing the old data.

Susan


                                                                                                                                          
                           Csaba Nagy                                                                                                     
                      <nagy@xxxxxxxxxxxxxx>          To:       Postgres general mailing list <pgsql-general@xxxxxxxxxxxxxx>               
                           Sent by:                  cc:                                                                                  
                                                     Subject:  Re: [GENERAL] allow LIMIT in UPDATE and DELETE                             
                                                                                                                                          
                      pgsql-general-owner@pos         |-------------------|                                                               
                      tgresql.org                     | [ ] Expand Groups |                                                               
                                                      |-------------------|                                                               
                                                                                                                                          
                           05/19/2006 07:22                                                                                               
                      AM                                                                                                                  
                                                                                                                                          
                                                                                                                                          




Well, first of all, you're not competing here with MySQL in this case, but
with Oracle. Our application does this using Oracle's ROWNUM trick and it
works perfectly fine. Now I guess you think Oracle's ROWNUM is also stupid
in this case, but it certainly helps us writing cleaner SQL, and a missing
postgres alternative which is easy to use won't help you in attracting
Oracle users.

Cheers,
Csaba.





----------------------------------------------------------------------------------------------
Simply protected storage solutions ensure that your information is
automatically safe, readily available and always there, visit us at http://www.overlandstorage.com
----------------------------------------------------------------------------------------------



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux