X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 439719DC802 for ; Wed, 11 Jan 2006 14:14:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33516-03 for ; Wed, 11 Jan 2006 14:14:16 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by postgresql.org (Postfix) with ESMTP id 7D1B09DC869 for ; Wed, 11 Jan 2006 14:14:14 -0400 (AST) Received: by wproxy.gmail.com with SMTP id i28so225249wra for ; Wed, 11 Jan 2006 10:14:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=S3cKgyE9jTh+S3Jtcz0+Wgxc53jNNq8M9+Ax/ibNh+Dj+uZ+N/9ZKMK3jnVutUTksM84Zyqt3YpeqQK/fnvs4apBCEP/vDiu0nI67WR6Qd5jWnTVz8xArBKuep+pGzHt7eZJC+4EWET/ePEzBxzBeyiCeWxTud0psSdhHHzcxio= Received: by 10.54.72.17 with SMTP id u17mr1270363wra; Wed, 11 Jan 2006 10:14:14 -0800 (PST) Received: by 10.54.92.14 with HTTP; Wed, 11 Jan 2006 10:14:14 -0800 (PST) Message-ID: Date: Wed, 11 Jan 2006 13:14:14 -0500 From: Jaime Casanova To: "Mauricio Fernandez A." Subject: Re: Unable to identify an ordering operator '<' for type 'smallint[]' Cc: pgsql-sql@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.084 required=5 tests=[AWL=0.084] X-Spam-Score: 0.084 X-Spam-Level: X-Archive-Number: 200601/42 X-Sequence-Number: 23831 On 1/11/06, Mauricio Fernandez A. wrote: > Hello I have been working in a report based on the query bellow. It work= s > fine in my development server which is postgres 8.0 but in production I h= ave > postgres 7.3 and I am getting the following error: > > SQL Error : > ERROR: Unable to identify an ordering operator '<' for type 'smallint[]' > Use an explicit ordering operator or modify the query > > In declaration: > select ac.idanalisis, ac.idpt, pt.codigohospital, ct.nombre as > nombrehospital, > pt.codigomedico, m.nombre || ' ' || m.apellidos as nombremedico, > ac.pacact, > ac.potencialpacientes, ac.planvisitas > from plannegocio.analisiscliente ac > inner join plannegocio.planterritorio pt on ac.idpt =3D pt.idpt > inner join centrotrabajo ct on pt.codigohospital =3D ct.codigo > inner join medico m on pt.codigomedico =3D m.codigo > where ac.idpt in > (select pt.idpt from plannegocio.planterritorio pt where pt.idplan= =3D > 1) > group by ac.idanalisis, ac.idpt, pt.codigohospital, ct.nombre, > pt.codigomedico, > nombremedico, ac.pacact, ac.potencialpacientes, ac.planvisitas > order by ct.nombre, nombremedico > > The only strange thing in the query is that ac.potencialpacientes is > smallint[] (in fact is the only thing with sense I can see in the error > message) but I am not using the '<' operator as it suggest. > > Can somebody help me?. > thanks in advance > > Mauricio Fern=E1ndez A. > Ingeniero de Sistemas > U. Aut=F3noma de Manizales > > that's why is a bad idea to develop in version that is superior to the one you will use in production... my advice, upgrade your production server to 8.1.2... there were some work in arrays in 8.x.x -- Atentamente, Jaime Casanova (DBA: DataBase Aniquilator ;)