Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A90E56FED5 for ; Tue, 19 Jun 2012 16:49:43 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sh4Qg-00089p-Ar for pgsql-bugs@postgresql.org; Tue, 19 Jun 2012 19:49:39 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sh4QS-00052x-SW for pgsql-bugs@postgresql.org; Tue, 19 Jun 2012 19:49:21 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1Sh4QS-0000EB-4R for pgsql-bugs@postgresql.org; Tue, 19 Jun 2012 19:49:20 +0000 Date: Tue, 19 Jun 2012 19:49:20 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6699: pg_restore with -j -- doesn't restore view that groups by primary key To: pgsql-bugs@postgresql.org From: joe@tanga.com X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/162 X-Sequence-Number: 33389 The following bug has been logged on the website: Bug reference: 6699 Logged by: Joe Van Dyk Email address: joe@tanga.com PostgreSQL version: 9.1.4 Operating system: OSX Description: = $ pg_restore -O -j 4 ~/tanga.dump -d tanga_dev_full_backup = pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 417; 1259 66296 VIEW site_channels monkey pg_restore: [archiver (db)] could not execute query: ERROR: column "channels.start_at" must appear in the GROUP BY clause or be used in an aggregate function LINE 2: SELECT channels.id, channels.start_at, channels.end_at, ... ^ Command was: CREATE VIEW site_channels AS SELECT channels.id, channels.start_at, channels.end_at, channels.title, channels.descriptio... site_channels view definition: 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; channels.id is a primary key.