From: | Sergey Konoplev <sergey(dot)konoplev(at)postgresql-consulting(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org>, Maxim Boguk <maxim(dot)boguk(at)postgresql-consulting(dot)com> |
Subject: | Re: Stored function signature incompatibility in index (probably a bug) |
Date: | 2012-06-28 17:40:34 |
Message-ID: | CAL_0b1sa20jh-29pdZJmh5XDNG3R6O+XBYBxoQPc7-cvUPgQ_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jun 28, 2012 at 8:59 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> A potential workaround is illustrated by:
>
> regression=# create index foobari on foobar (foosum(row(foobar.*)::foo));
> CREATE INDEX
> regression=# \d foobari
> Index "public.foobari"
> Column | Type | Definition
> --------+---------+--------------------------
> foosum | integer | foosum(ROW(f1, f2)::foo)
> btree, for table "public.foobar"
Thank you, Tom. It is a good idea. I need it for partitioning. So I am
going to create a parent table and the first partition with this
whole-row casted to the parent's type in index. Other partitions will
be created by CREATE...LIKE.
> but this seems like kind of a kluge. I'm not sure that we ought to
> insert such a thing rather than just throwing an error.
May be this issue and workaround is worth to be mentioned in docs
besides throwing an error?
--
Sergey Konoplev
a database architect, software developer at PostgreSQL-Consulting.com
http://www.postgresql-consulting.com
Jabber: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp Phone: +79160686204
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2012-06-28 18:34:11 | Re: Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute |
Previous Message | Tom Lane | 2012-06-28 16:59:00 | Re: Stored function signature incompatibility in index (probably a bug) |