Re: [HACKERS] About the types of fields in a data structure

2010-08-26 Thread Tom Lane
Pei He  writes:
> When I check the types of fields in a data structure, I found most
> fields are defined as general types, as List, Node. Then, To know the
> content inside the List, I need to track the usage of the fields.
> For example, the fromClause in SelectStmt is defined as List. And, the
> content in the ListCell is with the type of RangeVar.

> Is there other easier way to check the types information, rather than
> track through the code?

Usually, if a particular List field is predictably a list of just one
type of node, the declaration is (or should be) commented to tell you
that.  Look at struct Query in parsenodes.h for some examples.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] About the types of fields in a data structure

2010-08-26 Thread Pei He
Hi,
When I check the types of fields in a data structure, I found most
fields are defined as general types, as List, Node. Then, To know the
content inside the List, I need to track the usage of the fields.
For example, the fromClause in SelectStmt is defined as List. And, the
content in the ListCell is with the type of RangeVar.

Is there other easier way to check the types information, rather than
track through the code?
Or is there any document about it?

Thanks
--
Pei

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers