Re: About the types of fields in a data structure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pei He <hepeimail(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: About the types of fields in a data structure
Date: 2010-08-26 20:42:31
Message-ID: 28994.1282855351@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pei He <hepeimail(at)gmail(dot)com> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Cristian Bittel 2010-08-26 20:59:59 Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
Previous Message Tom Lane 2010-08-26 20:28:55 Re: CopyReadLineText optimization revisited