[HACKERS] Decimal values in

2014-02-17 Thread Masterprojekt Naumann1
Dear Dev-List, inside execProcnode.c's ExecProcNode method we want to extract the value of a tuple for a specific attribute. This works great for integers and strings, but we are not able to figure out how to do this for floating point numbers. Below is some example code snippet to show our proble

Re: [HACKERS] identify table oid for an AggState during plan tree initialization

2014-01-15 Thread Masterprojekt Naumann1
sible to attach and aggregate with a table. > > If you can explain what you intend to do with that information, there > might be other ways to solve your problem. > > > On Wed, Jan 15, 2014 at 3:29 PM, Masterprojekt Naumann1 < > mpws201...@gmail.com> wrote: > >> &

Re: [HACKERS] identify table oid for an AggState during plan tree initialization

2014-01-15 Thread Masterprojekt Naumann1
2014/1/15 Masterprojekt Naumann1 > 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: > > resultAsA

[HACKERS] identify table oid for an AggState during plan tree initialization

2014-01-15 Thread Masterprojekt Naumann1
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) {

Re: [HACKERS] Convert Datum* to char*

2014-01-06 Thread Masterprojekt Naumann1
2014/1/6 Thomas Fanghaenel > On Mon, Jan 6, 2014 at 8:09 AM, Masterprojekt Naumann1 > wrote: > > Why is the memory of the variable uninitialized? > > Are you checking that "i <= slot->tts_nvalid" before accessing the > tts_values and tts_isnull arrays? >

Re: [HACKERS] Convert Datum* to char*

2014-01-06 Thread Masterprojekt Naumann1
2014/1/6 Craig Ringer > On 01/06/2014 09:09 PM, Masterprojekt Naumann1 wrote: > > > Why is the memory of the variable uninitialized? > > Are there any other patches you've made to the running PostgreSQL instance? > > I'd want to run under Valgrind and see wha

Re: [HACKERS] Convert Datum* to char*

2014-01-06 Thread Masterprojekt Naumann1
angas > On 01/06/2014 03:09 PM, Masterprojekt Naumann1 wrote: > >> I want to read an attribute value from a TupleTableSlot. When I try to >> convert an attribute of SQL type varchar from Datum* to char* with the >> help >> of the method TextDatumGetCString(...)

[HACKERS] Convert Datum* to char*

2014-01-06 Thread Masterprojekt Naumann1
Hi, I want to read an attribute value from a TupleTableSlot. When I try to convert an attribute of SQL type varchar from Datum* to char* with the help of the method TextDatumGetCString(...), sometimes there is a segmentation fault. The segmentation fault comes from the method TextDatumGetCString(.