Pailloncy Jean-Gérard wrote:
>> I try to do:
>> CREATE RULE ndicti AS ON INSERT TO ndict
>> DO INSTEAD INSERT INTO 'ndict_' || (NEW.word_id & 255)
>> VALUES( NEW.url_id, NEW.word_id, NEW.intag);
>> I got an error on 'ndict_' .
>> I did not found the right syntax.
> In fact I discover that
> SELECT * FROM / INSERT INTO table
> doesn't accept function that returns the name of the table as table, but
> only function that returns rows....
> I'm dead.
> Does this feature, is possible or plan ?
> Is there a trick to do it ?
You could call a plpgsql function and inside that use EXECUTE (or use
pltcl or some other interpreted language).
Not sure what you're doing will help you much though. Are you aware that
you can have partial indexes?
CREATE INDEX i123 ON ndict WHERE (word_id & 255)=123;
That might be what you're after, but it's difficult to be sure without
knowing what problem you're trying to solve.
In response to
pgsql-performance by date
|Next:||From: Gavin Sherry||Date: 2004-05-06 22:29:11|
|Subject: Re: [PERFORM] [OFF-TOPIC] - Known maximum size of|
|Previous:||From: Litao Wu||Date: 2004-05-06 15:44:43|
|Subject: Re: pg_stat|