Skip site navigation (1) Skip section navigation (2)

Re: MySQL -> PostgreSQL conversion issue

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Scott Newton <scott(dot)newton(at)vadacom(dot)co(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: MySQL -> PostgreSQL conversion issue
Date: 2010-10-29 01:31:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Thu, Oct 28, 2010 at 6:44 PM, Scott Newton
<scott(dot)newton(at)vadacom(dot)co(dot)nz> wrote:
> Hi
> I have the following rather complicated SQL which works under MySQL but fails
> under PostgreSQL 8.3. The SQL is generated by A2Billing
> ( The issue is the following
> part of the SQL:
> as tf on tf.dnid=substr(cdr.dnid,1,length(tf.dnid))
> where tf.dnid is a bigint and cdr.dnid is varchar(40). The error returned is
> ERROR:  function length(bigint) does not exist at character 2521
> 2010-10-29 13:34:27 NZDT HINT:  No function matches the given name and
> argument types. You might need to add explicit type casts.

This is usually a precedence thing, i.e. you're trying to join to a
set that doesn't exist yet to that part of the query.  Newer versions
of mysql will also choke on such queries I believe as well.  Didn't
have time to go through your whole query but that's what to look for.

In response to


pgsql-general by date

Next:From: Dann CorbitDate: 2010-10-29 01:39:33
Subject: Re: MySQL -> PostgreSQL conversion issue
Previous:From: Scott NewtonDate: 2010-10-29 00:44:26
Subject: MySQL -> PostgreSQL conversion issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group