From: | Florian Gossin <fluancefg(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Can't restore view |
Date: | 2017-05-24 14:10:36 |
Message-ID: | CAPW7RPm+X4+Jvi5W4a2xRCyHwcqFbCfW9p+jnOYZi3f-U3j9cA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hello,
I'm writing here, however I'm not sure if it's a bug or if there's
something I don't understand correctly.
I'm doing a dump in directory format of database with several schemas using
pg_dump and when I try to restore it using pg_restore, I get the following
error:
ERROR: could not convert table "bmv_visits_list" to a view because it has
triggers
STATEMENT: CREATE RULE "_RETURN" AS
ON SELECT TO bmv_visits_list DO INSTEAD SELECT patient.firstname,
patient.lastname,
patient.birthdate,
company.code,
jsonb_agg(jsonb_build_object('nb', v.nb, 'admissiondt', v.admitdt,
'patientroom', v.patientroom)) AS visits
FROM (((ehealth.visit v
JOIN ehealth.company ON ((v.company_id = company.id)))
JOIN ehealth.m_rd_opa_pcl pcl ON ((((v.patientclass)::text =
(pcl.code)::text) AND (v.company_id = pcl.company_id))))
JOIN ehealth.patient ON ((patient.id = v.patient_id)))
WHERE (((v.patientclass)::text <> 'DEVE'::text) AND ((pcl.hl7code)::text =
'I'::text) AND ((v.admitstatus)::text = 'admitted'::text) AND
((v.dischargedt IS NULL) OR (v.dischargedt > ('now'::text)::timestamp
without time zone)))
GROUP BY patient.id, company.code;
I don't understand what the message means in that context.
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Gossin | 2017-05-24 14:18:12 | Can't restore view with pg_restore |
Previous Message | Andres Freund | 2017-05-24 13:04:41 | Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression |