| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: pg_dump versus rules, once again |
| Date: | 2016-11-17 03:00:49 |
| Message-ID: | 29254.1479351649@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> We've talked before about replacing this _RETURN-rule business with
> CREATE OR REPLACE VIEW, ie the idea would be for pg_dump to first emit
> a dummy view with the right column names/types, say
> CREATE VIEW vv AS SELECT null::int AS f1, null::text AS f2;
> and then later when it's safe, emit CREATE OR REPLACE VIEW with the view's
> real query.
Here's a proposed patch for that. It turns out there are some other
kluges that can be gotten rid of while we're at it: no longer need the
idea of reloptions being attached to a rule, for instance.
The changes in pg_backup_archiver.c would have to be back-patched
into all versions supporting --if-exists, so that they don't fail
on dump archives produced by patched versions. We could possibly
put the rest only into HEAD; I remain of two minds about that.
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| dump-view-fix.patch | text/x-diff | 16.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2016-11-17 03:06:43 | Re: pg_dump versus rules, once again |
| Previous Message | Kyotaro HORIGUCHI | 2016-11-17 02:59:02 | Re: Document how to set up TAP tests for Perl 5.8.8 |