Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id DBD58B5DC51 for ; Thu, 25 Aug 2011 11:53:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 72372-04 for ; Thu, 25 Aug 2011 14:53:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp103.prem.mail.sp1.yahoo.com (smtp103.prem.mail.sp1.yahoo.com [98.136.44.58]) by mail.postgresql.org (Postfix) with SMTP id 4AD6EB5DC4E for ; Thu, 25 Aug 2011 11:53:43 -0300 (ADT) Received: (qmail 71446 invoked from network); 25 Aug 2011 14:53:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=DKIM-Signature:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=RfcibbSplmLJMwIZFbmCZuG6PvMTqUZKLmunrl1+wHfcqqfhxUECFbIGqBscnZNnVtvKtEFP5yhzWiOCsBesQjDNRBIsCIXXWhTio8tknIXCkKaFfxSq6SGlm71BRrpyDLAdb9eh8GKIogy+Ybq6Q4IhbEUpQKV6F5JaQkIe03s= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1314284022; bh=bRWwocNaCeG2xM0qzt5VuwYZbkSmOZOIzc+vaQSiPZQ=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language; b=bke69fgxG27k033Shih9e3D8cwvHMS40ItKQ0+UMCnSHiHL16lCJ9BrFZwhT2muqQe5m/TrHrVkADR2eYX2eFTahNZlY+muVVN0HPqd3Evs9XJapaOtrrwSIx3mcbm47zU44QEoTsZfT1gSphQKh/AKNQy9Gb2Vo25WiiNCuokQ= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: VXlNxMUVM1lzKy8vZRO0ZQnQMoryrjB05QEGvS1pPQphQdg Az9.C0bxVUGQzRVFnCinynr6p6ayMvPdapNnxwpA9pFKjjU4Sud4GnWAFRdy bYNSZy8qMmvh3WJF.pyXuGkqvCoGGJ6z1OFzWW.pIy4aBnio.QIMsaKHOG1s Anfo1.Wlt74racJrMpsvSzMa5Fj2cik71Iok1smxDRoSMwIhc08pdEHZ3FdR jVaVGm_sWp3HBvd6_R4z75oEq2SW5MiUXOSWoWxb6u0dr_LXlaOLka_asnky p23e5GRX7QziZ7aZDahFJ1tmATVg1LQ08FvWNyhbtaIIqbNnhauGvscjgQQk MRVWgnajd3XEGn56.67gONHnEiPKZMWfjLixzIQ4ibPNupXdYTaPtG63fjXp qFC2G X-Yahoo-SMTP: mpGJl6eswBD2IBufoVEg0Pa8gg-- Received: from WolfDog (polobo@66.67.24.143 with login) by smtp103.prem.mail.sp1.yahoo.com with SMTP; 25 Aug 2011 07:53:42 -0700 PDT From: "David Johnston" To: "'gvim'" , "'pgsql sql'" References: <4E565A4E.9060400@gmail.com> In-Reply-To: <4E565A4E.9060400@gmail.com> Subject: Re: Add one column to another Date: Thu, 25 Aug 2011 10:53:33 -0400 Message-ID: <021201cc6336$c3547e20$49fd7a60$@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKPYgQR+3i+6hhpwQKKYBksNMzNppOnqRpQ Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.43 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.532, UNPARSEABLE_RELAY=0.001 X-Spam-Level: X-Archive-Number: 201108/107 X-Sequence-Number: 35775 I have to deal with a table which contains: first_name surname email1 email2 ... and I would like to create a view which combines both email columns thus: first_name surname email It looks simple but I can't think of an obvious query. ----------------------------------------------------------- SELECT first_name, surname, ARRAY[email1, email2] AS email FROM [...] David J.