Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key
Дата
Msg-id 1340139400-sup-7121@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key  (Ryan Kelly <rpkelly22@gmail.com>)
Ответы Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Excerpts from Ryan Kelly's message of mar jun 19 16:20:58 -0400 2012:
> On Tue, Jun 19, 2012 at 07:49:20PM +0000, joe@tanga.com wrote:

> > View definition:
> >  SELECT channels.id, channels.start_at, channels.end_at, channels.title
> >    FROM channels
> >    LEFT JOIN channels_products cp ON cp.channel_id =3D channels.id
> >    LEFT JOIN buyable_products bp ON bp.id =3D cp.product_id
> >   GROUP BY channels.id;
> >=20
> > channels.id is a primary key.
>=20
> Attached is a test case to reproduce the problem, courtesy of the
> original reporter.

The reason this doesn't work is that the primary key is not defined
until later in the restore process.

I think the fix is to make the view dependant on the primary key in the
dump file.

--=20
=C3=81lvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Ryan Kelly
Дата:
Сообщение: Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key