Re: Limitations of PostgreSQL

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Chris Travers <chris(at)travelamericas(dot)com>, Denis G Dudhia <denu79(at)rediffmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Limitations of PostgreSQL
Date: 2005-10-13 16:00:45
Message-ID: 1129219244.29961.187.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2005-10-12 at 20:08, Michael Fuhr wrote:
> On Wed, Oct 12, 2005 at 04:49:59PM -0500, Scott Marlowe wrote:
> > On Wed, 2005-10-12 at 16:16, Chris Travers wrote:
> > > Compared to MySQL, I can't think of any downsides. All relevant
> > > usability issues have been solved, though there are some functions like
> > > INTERVAL that are not supported (see my migration guide at
> > > http://www.metatrontech.com/wpapers/)
> >
> > What, exactly, is the interval function in MySQL? IS that one that
> > creates a sequence of numbers or whatnot? If so, there is an equivalent
> > in 8.0 now. By the way, interval is a SQL reserved keyword, so it's
> > surprising MySQL would choose to name a function after it.
>
> Surprising? C'mon now, this is MySQL :->
>
> Here's an excerpt from the MySQL documentation:
>
> INTERVAL(N,N1,N2,N3,...)
> Returns 0 if N < N1, 1 if N < N2 and so on or -1 if N is
> NULL. All arguments are treated as integers. It is required
> that N1 < N2 < N3 < ... < Nn for this function to work
> correctly. This is because a binary search is used (very fast).
>
> mysql> SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200);
> -> 3
> mysql> SELECT INTERVAL(10, 1, 10, 100, 1000);
> -> 2
> mysql> SELECT INTERVAL(22, 23, 30, 44, 200);

I could see how it might be possible to make a two argument user defined
function that took an argument like:

select intvl(10,'20 30 40 50 60');

so that the multiple arguments are really just a space or comma
separated list fed to the function. I wouldn't name it interval though.
:)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aly S.P Dharshi 2005-10-13 16:06:51 Re: Cluster/redundancy question
Previous Message Scott Marlowe 2005-10-13 15:46:29 Re: Limitations of PostgreSQL