Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uk5Ge-0005PK-3e for pgsql-sql@arkaria.postgresql.org; Wed, 05 Jun 2013 04:24:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Uk5Gd-0006H8-BX for pgsql-sql@arkaria.postgresql.org; Wed, 05 Jun 2013 04:24:11 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uk5Gb-0006H0-AR for pgsql-sql@postgresql.org; Wed, 05 Jun 2013 04:24:09 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uk5GV-0003Xv-Di for pgsql-sql@postgresql.org; Wed, 05 Jun 2013 04:24:08 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Uk5GT-00063P-Fr for pgsql-sql@postgresql.org; Tue, 04 Jun 2013 21:24:01 -0700 Date: Tue, 4 Jun 2013 21:24:01 -0700 (PDT) From: Jayadevan To: pgsql-sql@postgresql.org Message-ID: <1370406241472-5757977.post@n5.nabble.com> In-Reply-To: <4252864.NjuqYTl098@linux-12> References: <2071893.Jsp6YpFfLm@linux-12> <48DA836F3865C54B8FBF424A3B775AF667451998F1@Exchange-Server> <1450731.eLkFA9G6tq@linux-12> <48DA836F3865C54B8FBF424A3B775AF667451998F2@Exchange-Server> <4252864.NjuqYTl098@linux-12> Subject: Re: crosstab help MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.6 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Hello all , I have a similar situation - an EAV table. entity_attr_id integer entity_id bigint ent_attr_value character varying I am trying select * from crosstab('select entity_id::text as row_name, entity_attr_id::bigint as entity_attr_id , ent_attr_value::text as ent_attr_value from org_entity_attr_value order by 1') as ct( row_name text,entity_attr_id bigint,ent_attr_value text ) and get an error - ERROR: return and sql tuple descriptions are incompatible -- View this message in context: http://postgresql.1045698.n5.nabble.com/crosstab-help-tp5511994p5757977.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql