[GENERAL] Query Question

2005-09-27 Thread Frodo Larik
| t It is possible that a client has zero or more workers, I want to know if one of the workers has workers.ib = 't' set if this is true I like to have 't' returned else a 'f' Is this possible in a single query? Sincerely, Frodo Larik

Re: [GENERAL] Access NEW and OLD from function called by a rule

2005-08-13 Thread Frodo Larik
Frodo Larik wrote: That means I have to create functions like insert_person(workers) , insert_person(othertable) and function insert_person(anothertable). I found the solution to this "problem". Create a function with a Polymorphic Type (notice the anyelement): CREATE OR REPLAC

Re: [GENERAL] Access NEW and OLD from function called by a rule

2005-08-12 Thread Frodo Larik
Hi Tom, Tom Lane wrote: Frodo Larik <[EMAIL PROTECTED]> writes: PostgreSQL obviously complains about NEW not available, how can I make it available? Is this the way to do it? No. You seem to have read something about trigger functions, but this usage is not a trigger function

[GENERAL] Access NEW and OLD from function called by a rule

2005-08-12 Thread Frodo Larik
ROR: record "new" is not assigned yet DETAIL: The tuple structure of a not-yet-assigned record is indeterminate. CONTEXT: PL/pgSQL function "insert_person" line 2 at SQL statement PostgreSQL obviously complains about NEW not available, how can I make it available

[GENERAL] Stuck with references

2005-03-25 Thread Frodo Larik
solve this in one query. Is it possible or is it bad design? Sincerely, Frodo Larik ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match