Re: syntax for reaching into records, specifically ts_stat results - Mailing list pgsql-hackers

From Tom Lane
Subject Re: syntax for reaching into records, specifically ts_stat results
Date
Msg-id 20348.1228853589@sss.pgh.pa.us
Whole thread Raw
In response to syntax for reaching into records, specifically ts_stat results  (Dan Chak <chak@MIT.EDU>)
Responses Re: syntax for reaching into records, specifically ts_stat results  (Dan Chak <chak@MIT.EDU>)
List pgsql-hackers
Dan Chak <chak@MIT.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


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: syntax for reaching into records, specifically ts_stat results
Next
From: Dan Chak
Date:
Subject: Re: syntax for reaching into records, specifically ts_stat results