Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0wPS-0003Pl-Ng for pgsql-general@arkaria.postgresql.org; Fri, 14 Sep 2018 22:17:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g0wPP-000489-31 for pgsql-general@arkaria.postgresql.org; Fri, 14 Sep 2018 22:17:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g0wPO-000482-P6 for pgsql-general@lists.postgresql.org; Fri, 14 Sep 2018 22:17:50 +0000 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g0wPL-0006T4-QM for pgsql-general@lists.postgresql.org; Fri, 14 Sep 2018 22:17:50 +0000 Received: by mail-it0-x22a.google.com with SMTP id p129-v6so4468908ite.3 for ; Fri, 14 Sep 2018 15:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:organization:mime-version; bh=RRRJeiPl6ILSdsvoUE+ZFaENpTfQ4jGi+A0vRRjHsBE=; b=lR+ZloPFH4Z6OdYeQ/O+M0vimoaRG/ggP9uQMIDqwA6BOt6ly11V+lYD7H3wgSC8bU ehcLELzIlBNpxJFcF7OZz7xw1ba+NtkmUwC0vEZr4cbODsWqLaiQZjQE6f9D3ObWEUI6 k9yxt2yC4PfrF9SRTlEt357UZ8TxcmWAFeyBQz0p+d+NWT7f9pfwQrZZCScPS3aUGphb v6fYHCdtP8o1dN9JzLZSLUfg+Hfvd8qqcDzKDVLQcCGPwK6xOFwKYitc2SawbZrItczG oKg86EZJbpOYMy2gKqbCorCSUP/aU46pdL+I1U7sAM2zA6JbdNDaKV/oNLBkP3bqhoaR XTDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:mail-followup-to:date :in-reply-to:message-id:user-agent:organization:mime-version; bh=RRRJeiPl6ILSdsvoUE+ZFaENpTfQ4jGi+A0vRRjHsBE=; b=bN5JMGVBV+sy8utaFGoiQIn7WANDmOEBijnEJ6bdjOtwjJM6v+S6asDKuonEfiVK1j LF34C/Y/9hyaUQ5t/ahVamXdiIMzfBIn81dwmAVeDu60cTcR26uPo6ObYyl8NcZLW/fv KslZ3UfGbRpoM6D8ZnQr1ijO9fJh5xthyRGziIkMEFJaHRAAROaYeI6O4Hl+Sy1e5ddJ Fp4lIxkG07BDzWhsiovPEW19IXvM8sSozU8+c03w9I445ln4Xu9mzogDragtlu4oy1IM Ex6XrZ8bqwQF6HOsgCqBzDqvqD9CH9kWmax/p/fluuvWQonnm/wJCkPUD0ObGamCHQH4 PfSQ== X-Gm-Message-State: APzg51DAhC9AxPrImbZmgfXieilbFjMnjR5hEsXdqeHX7WykV2a7oQk6 8oZnEhgRIR1DhMWf84TOzs3GRaHh X-Google-Smtp-Source: ANB0VdbFN9fpVAyM3LFrxiMM75mv2XD8vs+tYqLc3xxwxYGheEDHVJ9vaBve2v2B8Dksb2JUoMgYZw== X-Received: by 2002:a02:778d:: with SMTP id g135-v6mr13480979jac.90.1536963465319; Fri, 14 Sep 2018 15:17:45 -0700 (PDT) Received: from smtp.gmail.com (net82.ceos.umanitoba.ca. [130.179.67.82]) by smtp.gmail.com with ESMTPSA id p5-v6sm90084itg.27.2018.09.14.15.17.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Sep 2018 15:17:44 -0700 (PDT) From: "Sebastian P. Luque" To: pgsql-general@lists.postgresql.org Subject: Re: column information from view References: <87in373gpd.fsf@gmail.com> <60527cd2-6c53-ddf0-901d-20b2221a1a3b@aklaver.com> Mail-Followup-To: pgsql-general@lists.postgresql.org Date: Fri, 14 Sep 2018 17:17:43 -0500 In-Reply-To: <60527cd2-6c53-ddf0-901d-20b2221a1a3b@aklaver.com> (Adrian Klaver's message of "Fri, 14 Sep 2018 14:47:07 -0700") Message-ID: <87efdv3erc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Organization: University of Manitoba MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, 14 Sep 2018 14:47:07 -0700, Adrian Klaver wrote: > SELECT cols.ordinal_position, cols.column_name, > col_description(cl.oid, cols.ordinal_position::INT) > FROM pg_class cl, information_schema.columns cols > WHERE cols.table_catalog='aquaculture' AND cols.table_schema ilike > 'pg_temp%' AND > cols.table_name = 'c_data' AND cols.table_name = cl.relname > ORDER BY cols.ordinal_position::INT; > ordinal_position | column_name | col_description > ------------------+----------------+----------------- > 1 | source_id | NULL > 2 | geography_desc | NULL Exactly, except that the column descriptions reside in the persistent view whereas the above pulls them from the temporary view, which are all NULL. Always learning something here. Thanks, -- Seb