Re: syntax for reaching into records, specifically ts_stat results

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

That works perfectly!

Thanks,
Dan

On Dec 9, 2008, at 3:13 PM, Tom Lane wrote:

> 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-12-09 20:49:17 Re: Quick patch: Display sequence owner
Previous Message Tom Lane 2008-12-09 20:13:09 Re: syntax for reaching into records, specifically ts_stat results