X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A166652C83 for ; Thu, 11 Aug 2005 06:54:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41440-02 for ; Thu, 11 Aug 2005 09:54:53 +0000 (GMT) Received: from smtp.nildram.co.uk (smtp.nildram.co.uk [195.112.4.54]) by svr1.postgresql.org (Postfix) with ESMTP id BD93552CA6 for ; Thu, 11 Aug 2005 06:54:51 -0300 (ADT) Received: from HYDROGEN (unknown [62.3.216.34]) by smtp.nildram.co.uk (Postfix) with ESMTP id B475F252AE9; Thu, 11 Aug 2005 10:54:51 +0100 (BST) From: "Nick Stone" To: "'nori'" , "'Mischa Sandberg'" Cc: Subject: Re: How to alias table columns in result? Date: Thu, 11 Aug 2005 10:56:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <174550350508110248d4fc071@mail.gmail.com> Thread-Index: AcWeWjJqVhCaY9zqTRSDl6vjOm0xgwAAL90Q Message-Id: <20050811095451.B475F252AE9@smtp.nildram.co.uk> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200508/54 X-Sequence-Number: 22282 Yes - just alias the columns you need to alias Nick -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of nori Sent: 11 August 2005 10:48 To: Mischa Sandberg Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] How to alias table columns in result? Thanks Sorry, my question was missing one important detail. My tables have quite a lot columns (which unfortunately have same names in both tables) so is it possible to do same as below but without specifying alias for each column. Now my queries are long and they do not look nice. boris On 8/11/05, Mischa Sandberg wrote: > SELECT d.name as "d.name", > d.index as "d.index", > c.name as "c.name", > ... ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend