Re: Migration issue

From: "Selena Deckelmann" <selenamarie(at)gmail(dot)com>
To: "Terminal Station" <terminale(at)gmail(dot)com>
Cc: pgsql-www(at)postgresql(dot)org
Subject: Re: Migration issue
Date: 2008-03-03 00:26:41
Message-ID: 2b5e566d0803021626t60e8fce2mbb7cd313347813ad@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Sun, Mar 2, 2008 at 3:18 PM, Terminal Station <terminale(at)gmail(dot)com> wrote:
> Url : http://pugs.postgresql.org/directory

> * warning: pg_query() [function.pg-query]: Query failed: ERROR:
> function left(character varying, integer) does not exist LINE 1:
> SELECT count(DISTINCT(LEFT(term_data.name, 1))) FROM node no... ^
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts. in
> /usr/local/www/drupal5/includes/database.pgsql.inc on line 125.

[trimmed]

This is not a casting problem.

The problem is the LEFT() function call. This is a mysql-specific
function that returns the left-most characters. I fixed it by creating
a function that just uses SUBSTR() instead.

But there's another bug :(

And, I fixed it. There was a missing column in a GROUP BY.

-selena

--
Selena Deckelmann
PDXPUG - Portland PostgreSQL Users Group
http://pugs.postgresql.org/pdx
http://www.chesnok.com/daily

In response to

Browse pgsql-www by date

  From Date Subject
Next Message Adrian Maier 2008-03-03 12:53:34 PostgreSQL website translations
Previous Message Marc G. Fournier 2008-03-03 00:01:45 Re: An actually *useful* mail-list message footer