From: | Masterprojekt Naumann1 <mpws2013n1(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: identify table oid for an AggState during plan tree initialization |
Date: | 2014-01-15 09:59:59 |
Message-ID: | CANjJybSy5Nyq6_rH6P8BgoW212q9ub6+NyzT24WOErm6NG1fmw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2014/1/15 Masterprojekt Naumann1 <mpws2013n1(at)gmail(dot)com>
> Hi,
>
> during the initialization of the nodes in the plan tree (in ExecInitNode
> in the file execProcnode.c) I want to find out for a node with the type
> T_Agg which table will be aggregated. I tried the following:
>
> resultAsAggState = ExecInitAgg((Agg *) node, estate, eflags);
>
> if (resultAsAggState)
> {
> //tableOid = rel->rd_id;
> //tableOid = resultAsAggState->ss.ss_currentRelation->rd_id;
> }
> It would be great to get the Oid of the table, but I would also be
> satisfied if I could get at least the name of the table. Does anyone know
> if it is possible to gather these information?
>
> Best regards
> Cathleen
>
Sorry my mail program send the mail to early. Please ignore the line
tableOid = rel->rd_id. I was just deleting the line when google send the
mail :(
resultAsAggState is of the type AggState. As you can see I tried to get the
Oid with the ScanState inside of the AggState, but its Relation
ss_currentRelation is not set already. Is there another way to get the Oid?
From | Date | Subject | |
---|---|---|---|
Next Message | Mel Gorman | 2014-01-15 10:08:44 | Re: Linux kernel impact on PostgreSQL performance |
Previous Message | Asif Naeem | 2014-01-15 09:56:46 | Re: [bug fix] PostgreSQL fails to start on Windows if it crashes after tablespace creation |