Re: syntax for reaching into records, specifically ts_stat results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Chak <chak(at)MIT(dot)EDU>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: syntax for reaching into records, specifically ts_stat results
Date: 2008-12-09 20:13:09
Message-ID: 20348.1228853589@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dan Chak <chak(at)MIT(dot)EDU> writes:
> If I say stat.word (instead of subscripting), I get 'missing FROM-
> clause entry for table "stat"'. If I say foo.stat.word, I get
> 'ERROR: schema "foo" does not exist'.

I think the syntax you need is (stat).word etc. See "Field Selection"
here:
http://www.postgresql.org/docs/8.3/static/sql-expressions.html#AEN1679
The reason for the parens is exactly to distinguish whether the leading
word is a table or column name.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dan Chak 2008-12-09 20:19:24 Re: syntax for reaching into records, specifically ts_stat results
Previous Message Dan Chak 2008-12-09 20:11:58 Re: syntax for reaching into records, specifically ts_stat results