About debug means ---How to debug a function seperately in an easy way?

From: 汪琦 <billywq(at)163(dot)com>
To: pgsql-hackers(at)postgresql(dot)org <pgsql-hackers(at)postgresql(dot)org>
Subject: About debug means ---How to debug a function seperately in an easy way?
Date: 2008-12-15 09:17:54
Message-ID: 494623EA.00F8B3.24276@m12-12.163.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, pgsql-hackers:

I want to debug one function in postgre backend.

for example, I want to debug the following function :

array_set(ArrayType *array,
int nSubscripts,
int *indx,
Datum dataValue,
bool isNull,
int arraytyplen,
int elmlen,
bool elmbyval,
char elmalign)

What I want is to set various inputs, and see the corresponding result.

Meanwhile , I don't know how to design the test case from the regular process, from TCOP, parser, analyzer,... and finally to array_set()

I just want to take it in an easy way, for example , I write some code somewhere in postgre backend source
code, and make up many different inputs and see the result returned by this function array_set.

Is there some convenient way to do it?

Thanks a lot ^_^

yours sincerely
     billywq(at)163(dot)com
       2008-12-15

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas OSB sIT 2008-12-15 09:21:39 Re: WIP: default values for function parameters
Previous Message Pavel Stehule 2008-12-15 09:15:09 Re: Function with defval returns error