>
> well, if you *had* to use any you could rewrite that as:
Using ANY I'll reduce number of subqueries, there are also some array
overlappings, which works fine with same subquery - i.e. when " && " instead
of " = ANY ". There is not full qi\uery in my first message of course.
> SELECT *
> FRO
With Postgres 8.4 query like
SELECT *
FROM core.tag_links ctl
WHERE (ctl.tag_id = ANY (
SELECT array_agg(ct.id)
FROM core.tags ct
WHERE (LOWER(ct.tag) LIKE LOWER(('search tag')::text || '%') ESCAPE
E'\\')
));
produces error:
ERROR: operator does not e
> The referential integrity triggers contain some extra magic that isn't
> easily simulatable in userland, and that is necessary to make the
> foreign key constraints airtight. We've discussed this previously but
> I don't remember which thread it was or the details of when things
> blow up. I th
> Sure -- use CREATE UNIQUE INDEX.
>
> alvherre=# create function singleton(int) returns int immutable language sql
as $$ select 1 $$;
> CREATE FUNCTION
> alvherre=# create table singleton (a int);
> CREATE TABLE
> alvherre=# create unique index only_one on singleton (singleton(a));
> CREATE IND
For now Postgres able to create deferrable uniques with following syntax:
...
and table_constraint is:
[ CONSTRAINT constraint_name ]
{ UNIQUE ( column_name [, ... ] ) index_parameters |
PRIMARY KEY ( column_name [, ... ] ) index_parameters |
CHECK ( expression ) |
FOREIGN KEY ( column_name
> > Will 9.1 partitions allow to reference partitioned tables in foreign keys?
>
> For now, you can do something like this:
>
> http://people.planetpostgresql.org/dfetter/index.php?/archives/51-
Partitioning-Is-Such-Sweet-Sorrow.html
>
> Cheers,
> David.
>
Already did ;) But workable plain ref
> Here is a revised partitioning syntax patch. It implements only syntax and
> on-disk structure mentioned below:
> Table Partitioning#Syntax
> http://wiki.postgresql.org/wiki/Table_partitioning#Syntax
> Table Partitioning#On-disk structure
> http://wiki.postgresql.org/wiki/Tabl
> Here is a revised partitioning syntax patch. It implements only syntax and
> on-disk structure mentioned below:
> Table Partitioning#Syntax
> http://wiki.postgresql.org/wiki/Table_partitioning#Syntax
> Table Partitioning#On-disk structure
> http://wiki.postgresql.org/wiki/Tabl
> How can a pl/pgsql trigger change the
> values of dynamic fields in NEW record ?
>
> By "dynamic" I mean that the field name
> is a variable in the trigger context.
It's not possible in plpgsql, but you can write plperl function, and later use
it in plpgsql triggers.
Regards,
Dmitry
--
Sen