Re: [BUGS] unhelpful error message

2009-06-18 Thread Tom Lane
"Kevin Grittner" writes: > It's used in an example in 34.4.2 without a lot of definition. From > experimenting a bit, it appears that when referencing a composite data > value, any function which can take as its only parameter an instance > of that composite type can be used as though it were a f

Re: [BUGS] unhelpful error message

2009-06-18 Thread Kevin Grittner
Tom Lane wrote: > Look under "computed fields" in the index ... looks like it's > towards the bottom of 34.4.2 in the 8.3 docs. > http://www.postgresql.org/docs/8.3/static/xfunc-sql.html#AEN40267 > > I had thought it was mentioned somewhere in chapter 4 as well, but > am not seeing it there ri

Re: [BUGS] unhelpful error message

2009-06-18 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> Per the fine manual, sp.count is another way of writing count(sp). > Wow, that seems a horrid kludge. Is the standard responsible for that > one, or is it a PostgreSQL extension? Actually, we inherited that from PostQUEL. It's not in the standar

Re: [BUGS] unhelpful error message

2009-06-18 Thread Kevin Grittner
Tom Lane wrote: > Per the fine manual, sp.count is another way of writing count(sp). Wow, that seems a horrid kludge. Is the standard responsible for that one, or is it a PostgreSQL extension? Could you point me at where in the fine manual this is covered? I've never stumbled across it in

Re: [BUGS] unhelpful error message

2009-06-18 Thread hubert depesz lubaczewski
On Thu, Jun 18, 2009 at 10:03:21AM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > # create table sold_products (items int4, product_id int4); > > # create table products (id int4, codename text); > > # select sp.count, p.codename from sold_products sp join products p on > > sp.pro

Re: [BUGS] unhelpful error message

2009-06-18 Thread Tom Lane
hubert depesz lubaczewski writes: > # create table sold_products (items int4, product_id int4); > # create table products (id int4, codename text); > # select sp.count, p.codename from sold_products sp join products p on > sp.product_id = p.id; > shown error: > ERROR: column "p.codename" must a

[BUGS] unhelpful error message

2009-06-18 Thread hubert depesz lubaczewski
Hi, I tested it on 8.3.7 and on 8.4, but it doesn't seem to be version bound. steps to reproduce: # create table sold_products (items int4, product_id int4); # create table products (id int4, codename text); # select sp.count, p.codename from sold_products sp join products p on sp.product_id = p