Question about partition table

From: Yuxia Qiu <yuxiaqiu1(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Question about partition table
Date: 2018-10-27 00:04:56
Message-ID: CAJ0a2RmvJiRCNvz9FDxb6qMa=BF+Y4n0YiU3Ta7mmL=e=u3QPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

HI Dear PostgreSQL team,

I have created a partition table as bellow:
*CREATE TABLE* measurement_year_month (
logdate date not null,
peaktemp int,
unitsales int
) PARTITION BY RANGE (EXTRACT(YEAR FROM logdate), EXTRACT(MONTH FROM
logdate));

so the content for this column *partexprs* for this table in
pg_partitioned_table will be:

({FUNCEXPR :funcid 1384 :funcresulttype 701 :funcretset false :funcvariadic
false :funcformat 0 :funccollid 0 :inputcollid 100 :args ({CONST :consttype
25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false
:constisnull false :location 122 :constvalue 8 [ 32 0 0 0 121 101 97 114 ]}
{VAR :varno 1 :varattno 1 :vartype 1082 :vartypmod -1 :varcollid 0
:varlevelsup 0 :varnoold 1 :varoattno 1 :location 132}) :location 114}
{FUNCEXPR :funcid 1384 :funcresulttype 701 :funcretset false :funcvariadic
false :funcformat 0 :funccollid 0 :inputcollid 100 :args ({CONST :consttype
25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false
:constisnull false :location 150 :constvalue 9 [ 36 0 0 0 109 111 110 116
104 ]} {VAR :varno 1 :varattno 1 :vartype 1082 :vartypmod -1 :varcollid 0
:varlevelsup 0 :varnoold 1 :varoattno 1 :location 162}) :location 142})

My question is: Can I get string value from this column? and how?
In the end I want to have the bellow result:

*Table name* *Partition
information*
measurement_year_month (EXTRACT(YEAR FROM logdate),
EXTRACT(MONTH FROM logdate))

Your help is highly appreciated.

Thanks,
Yuxia

Responses

Browse pgsql-general by date

  From Date Subject
Next Message GPT 2018-10-27 09:28:46 Re: rw_redis_fdw: SQL Errors when statement is within a function
Previous Message Jeff Janes 2018-10-26 22:55:31 Re: GIN Index for low cardinality