Re: Stored function signature incompatibility in index (probably a bug)

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: Stored function signature incompatibility in index (probably a bug)
Дата
Msg-id CAL_0b1sa20jh-29pdZJmh5XDNG3R6O+XBYBxoQPc7-cvUPgQ_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Stored function signature incompatibility in index (probably a bug)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Jun 28, 2012 at 8:59 PM, Tom Lane <tgl@sss.pgh.pa.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.ru@gmail.com Skype: gray-hemp Phone: +79160686204

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Stored function signature incompatibility in index (probably a bug)
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute