Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Joshua Waihi <josh(at)catalyst(dot)net(dot)nz>
Cc: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, francois(dot)perou(at)free(dot)fr, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Advocacy <pgsql-advocacy(at)postgresql(dot)org>, dpage(at)pgadmin(dot)org
Subject: Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL
Date: 2010-03-07 23:05:29
Message-ID: 4B943139.40503@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers

Joshua,

I've moved this discussion to pgsql-advocacy where it belongs.

> Aside from Drupal core, its too soon to know if there will be problems
> with D7 contrib but there are a few major bugs about other D6 contrib
> modules. The biggest one, which I think need movement to get fixed is in
> the Views module. The Views module has a bit of a hard time trying to
> please both databases and its surrounding the use of DISTINCT and
> restricting duplicate results. They've opted for a solution that really
> hits hard on PostgreSQL's performance. Bascially, when a DISTINCT clause
> is used, all other fields being selected get a custom functional called
> FIRST rapped around them: SELECT DISTINCT(nid), FIRST(title),
> FIRST(body), ..... The function merely returns the first value when two
> values are present for that row. This is the alternate instead of
> grouping by each field. Its stupid and needs to be fixed. The issue is
> here: http://drupal.org/node/460838

What's the obstacle to fixing it? It seems like just changing to SELECT
DISTINCT ON ... would do the trick, and would allow cutting code.

--Josh Berkus

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Joshua Waihi 2010-03-08 00:34:21 Re: [HACKERS] SQL compatibility reminder: MySQL vs PostgreSQL
Previous Message Joshua Waihi 2010-03-07 20:55:19 Re: SQL compatibility reminder: MySQL vs PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-03-07 23:26:38 Re: Re: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Previous Message Zdenek Kotala 2010-03-07 20:57:32 Re: psql with GSS can crash