Re: [SQL] Create functions using a function

2010-03-08 Thread Jasen Betts
On 2010-03-01, Gianvito Pio pio.gianv...@gmail.com wrote: --001485f44fc07594a40480c43c01 Content-Type: text/plain; charset=ISO-8859-1 Hi all, is there a way to define functions and/or triggers in a function? assuming plpgsql: execute For example, can I create a function that takes an

Re: [SQL] Does IMMUTABLE property propagate?

2010-03-08 Thread Jasen Betts
On 2010-03-06, Petru Ghita petr...@venaver.info wrote: Given f1(x) as IMMUTABLE and f2(x) as IMMUTABLE, and f3(f1,f2) as IMMUTABLE, does the query planner cache the result of f3 and reuse it or if you want to get a little more speed you better explicitly define yourself f3 as IMMUTABLE? I

Re: [SQL] Help : insert a bytea data into new table

2010-03-08 Thread Ben Morrow
Quoth dennis den...@teltel.com: I need to copy some data to new table. But I encounter some error message. the table structure Table A: c1 char c2 bytea Table B: c1 char c2 bytea My sql command: insert into B as select * from a where c1=xxx 'AS' isn't valid