[GENERAL] Feature proposal and discussion: full-fledged column/function equivalence

2014-08-01 Thread Chris Travers
Hi all; I had a pleasant surprise today when demonstrating a previous misfeature in PostgreSQL behaved unexpectedly. In further investigation, there is a really interesting syntax which is very helpful for some things I had not known about. Consider the following: CREATE TABLE keyvaltest (

Re: [GENERAL] Feature proposal and discussion: full-fledged column/function equivalence

2014-08-01 Thread Vik Fearing
On 08/01/2014 04:57 PM, Chris Travers wrote: Hi all; I had a pleasant surprise today when demonstrating a previous misfeature in PostgreSQL behaved unexpectedly. In further investigation, there is a really interesting syntax which is very helpful for some things I had not known about.

Re: [GENERAL] Feature proposal and discussion: full-fledged column/function equivalence

2014-08-01 Thread Vik Fearing
On 08/01/2014 06:28 PM, Vik Fearing wrote: So with all this in mind, is there any reason why we can't or shouldn't allow: CREATE testfunction(test) returns int language sql as $$ select 1; $$; SELECT testfunction FROM test; That would allow first-class calculated columns. I