From: Scott Marlowe <scott.marlowe@gmail.com>
To: SCassidy@overlandstorage.com
Cc: PostgreSQL <pgsql-general@postgresql.org>
Cc: pgsql-general-owner@postgresql.org
Subject: Re: Oracle and Postgresql
Date: Wed, 3 Sep 2008 10:53:40 -0600
Message-ID: <dcc563d10809030953i68eb5278o9cfcf98375ecefcc@mail.gmail.com> (raw)
In-Reply-To: <OF30D723D5.F0FF3785-ON882574B9.00552D9F-882574B9.0055CEFF@overlandstorage.com>
References: <48BE0DF6.1010507@comcast.net>
<OF30D723D5.F0FF3785-ON882574B9.00552D9F-882574B9.0055CEFF@overlandstorage.com>
On Wed, Sep 3, 2008 at 9:36 AM, <SCassidy@overlandstorage.com> wrote:
>
> I don't know if Oracle changed recently, but the last few times I used it,
> it was incredibly annoying having to put everything in a subquery to get a
> LIMIT-type operation to work AFTER the sort, so that you could use their
> ROWNUM. For example, to get the first 50 rows of a SELECT result. Their
> ROWNUM worked BEFORE the ORDER BY, so to get the 1st 50 rows, you had to put
> the query in a subselect, and say SELECT ... where ROWNUM <= 50.
>
> I love OFFSET ... LIMIT in PostgreSQL! I do a lot of web applications, and
> it is incredibly handy to page output with.
Yeah, those kinds of things drove me a little crazy. I think
PostgreSQL's equivalent parsing peculiarity is the need to put certain
things in an extra set of parens for creating an index. But really
that's pretty minor compared to rownum versus order by firing order.
One of the things an Oracle DBA coworker of mine found really
bothersome at first in pgsql was that suddenly on large queries that
he'd never needed an order by on Oracle, he was getting randomly
ordered reporting data. He was flabbergasted that something would use
an aggregation method that wouldn't result in an ordered set. He was
sure it would be a loser with an order by but it was very very fast on
large numbers of rows. I think that if you're really used to one
database you'll find a new one bothersome in some ways, and a pleasure
to use in others.
Once I had installed rlwrapper on sqlplus I was ok. It wasn't in the
same league as psql, which is the greatest command line sql monitor
ever created, but having line editing and history made sqlplus usable.
It was cool to hit !alter sess and get my previous default schema
statement. All the Oracle DBAs around me were working in guis and
they'd walk by and think I in psql, I'd ask them to look at something,
like a query, and it would take them about 10 seconds to realize I was
working on oracle from the command line.
If I could ask for one thing from Oracle it would be that they borrow
the basic operational characteristics of psql and stuff it into
sqlplus or whatever they use. Having the \ commands and expanded
versions in sqlplus would have been awesome.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: scott.marlowe@gmail.com, SCassidy@overlandstorage.com, pgsql-general-owner@postgresql.org
Subject: Re: Oracle and Postgresql
In-Reply-To: <dcc563d10809030953i68eb5278o9cfcf98375ecefcc@mail.gmail.com>
References: <48BE0DF6.1010507@comcast.net> <OF30D723D5.F0FF3785-ON882574B9.00552D9F-882574B9.0055CEFF@overlandstorage.com> <dcc563d10809030953i68eb5278o9cfcf98375ecefcc@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox