pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: koktos632@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16437: The dump is stored with error in creating VIEW statement.
Date: Thu, 14 May 2020 13:18:51 -0400
Message-ID: <6545.1589476731@sss.pgh.pa.us> (raw)
In-Reply-To: <16437-5257db04508943ab@postgresql.org>
References: <16437-5257db04508943ab@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> pg_restore: creating VIEW "ctrader.sentiment_summary_600"
> pg_restore: while PROCESSING TOC:
> pg_restore: from TOC entry 252; 1259 25769 VIEW sentiment_summary_600
> quotefeeder
> pg_restore: error: could not execute query: ERROR:  column
> "_materialized_hypertable_2.Volume" must appear in the GROUP BY clause or be
> used in an aggregate function

Hm.  I suppose that this view is valid in the source database because
"Time" and/or "m_tickerId" are the primary key of
_materialized_hypertable_2, and the restore is failing because pg_dump
didn't restore the primary key constraint first.  But it should know
to do that, and you haven't provided nearly enough information to track
down why it didn't.

Can you provide a self-contained test case that fails like this?
We probably don't need to see any data, just the database
object declarations.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <6545.1589476731@sss.pgh.pa.us>
Permalink:  ../6545.1589476731@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6545.1589476731@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, koktos632@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16437: The dump is stored with error in creating VIEW statement.
  In-Reply-To: <6545.1589476731@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox