Hello,
I'm trying to generate a table with information from a temporary view
that simply selects a subset of columns from a persistent view in a
given schema. The persistent view joins a number of tables with columns
that may or may not have a description entered.
Here's my attempt at listing th
On Fri, 14 Sep 2018 18:29:27 -0400,
Tom Lane wrote:
> "Sebastian P. Luque" writes:
>> Tom Lane wrote:
>>> Personally, I'd probably write it something like this:
>>> select pa.attnum, pa.attname, col_description(pa.attrelid,
>>> pa.attnum) from pg_attribute pa, pg_attribute ta where pa.attrelid
On 9/14/18 3:17 PM, Sebastian P. Luque wrote:
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'
"Sebastian P. Luque" writes:
> Tom Lane wrote:
>> Personally, I'd probably write it something like this:
>> select pa.attnum, pa.attname, col_description(pa.attrelid, pa.attnum)
>> from pg_attribute pa, pg_attribute ta where pa.attrelid =
>> 'persistent_view'::regclass and ta.attrelid =
>> 'temp
On Fri, 14 Sep 2018 17:52:28 -0400,
Tom Lane wrote:
> Umm ... why are you doing cols.table_name = 'persistent_view' and not
> cols.table_name = 'temporary_view' ?
I should have pointed out that the column descriptions are all NULL in
the temporary view, and I'd like to pull them from the persist
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%'
"Sebastian P. Luque" writes:
> Here's my attempt at listing the temporary view's columns and respective
> descriptions:
> 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_
On 9/14/18 2:35 PM, Sebastian P. Luque wrote:
Hello,
I'm trying to generate a table with information on columns from a
temporary view that simply selects a subset of columns from a persistent
view in a given schema. The persistent view joins a number of tables
with columns that may or may not h
Hello,
I'm trying to generate a table with information on columns from a
temporary view that simply selects a subset of columns from a persistent
view in a given schema. The persistent view joins a number of tables
with columns that may or may not have a description entered. I need a
table with