Re: [PERFORM] TEXT or LONGTEXT?

2007-09-24 Thread Niklas Johansson
s/8.2/interactive/datatype-character.html Sincerely, Niklas Johansson ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [PERFORM] How to speed up this "translation" query?

2006-08-01 Thread Niklas Johansson
d=t2.meaning_id WHERE t2.language_id=5; The query will also benefit from indices on trans.meaning_id and trans.language_id. Also make sure the tables are vacuumed and analyzed, to allow the planner to make good estimates. Sincerely, Niklas Johansson ---(e

Re: [PERFORM] Trigger vs Rule

2006-04-03 Thread Niklas Johansson
On 2 apr 2006, at 23.08, Niklas Johansson wrote: CREATE OR REPLACE FUNCTION exec_device_type() RETURNS trigger AS $$ EXECUTE "SELECT device_type" || OLD.type || "(OLD.id)"; $$ LANGUAGE plpgsql; Sorry, I was bitten by the bedbug there: a plpgsql function needs

Re: [PERFORM] Trigger vs Rule

2006-04-02 Thread Niklas Johansson
() RETURNS trigger AS $$ EXECUTE "SELECT device_type" || OLD.type || "(OLD.id)"; $$ LANGUAGE plpgsql; Best would probably be to refactor your device_typeN() functions into one, that would take N as an argument. Sincerely, Niklas Johansson