X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D538ED1B553 for ; Mon, 6 Oct 2003 16:35:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 01948-03 for ; Mon, 6 Oct 2003 13:34:40 -0300 (ADT) Received: from mta3.snet.net (mta3.snet.net [204.60.203.69]) by svr1.postgresql.org (Postfix) with ESMTP id 3F8D3D1B55E for ; Mon, 6 Oct 2003 13:34:24 -0300 (ADT) Received: from [192.168.1.203] (167.95.252.64.snet.net [64.252.95.167]) by mta3.snet.net (8.12.3/8.12.3/SNET-smtp-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id h96GYCIJ012331 for ; Mon, 6 Oct 2003 12:34:13 -0400 (EDT) Date: Mon, 6 Oct 2003 12:29:31 -0400 (EDT) From: Wei Weng X-X-Sender: wweng@localhost.localdomain To: pgsql-sql@postgresql.org Subject: suggestion needed for implementation Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/70 X-Sequence-Number: 15470 I need to create triggers on a number of tables that have full text search capability. The trigger, basically, needs to call select set_curcfg('default') first to set the locale , then call tsearch2 function on the text columns in the table to update the index. How can I implement a trigger that does two different thing (select and tsearch2) together? I was thinking about making them into one function, say, function updatetbl(), that does two things together. But then, postgresql does not allow variable length of arguments. updatetbl can not just take arbitrary number of arguments to pass on tsearch2. What can I do here to implement this trigger? Thanks Wei