Re: alter server for foreign table

From: Nico Williams <nico(at)cryptonector(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: alter server for foreign table
Date: 2017-09-29 20:55:16
Message-ID: 20170929205515.GF1251@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 29, 2017 at 10:19:03PM +0200, David Fetter wrote:
> On Fri, Sep 29, 2017 at 01:47:59PM -0400, Tom Lane wrote:
> > Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> writes:
> > > According to Postgresql documentation it is not possible to alter server
> > > for foreign table:
> > > https://www.postgresql.org/docs/10/static/sql-alterforeigntable.html
> >
> > Hmm, we'd have to check if the table's options were legal for the
> > new FDW, but in principle we could support this, I suppose.
> > Not sure if it's useful enough to be worth the trouble.
>
> It would definitely be useful if it were available. Nodes are a good
> bit more fungible than they were even 5 years back.

It would be nice to have DDLs for everything ALTERation that one could
make that is trivial to support.

It would also be nice to have a rule that every DDL (and every ADD/DROP
in ALTER statements) support IF EXISTS / IF NOT EXISTS, and, where
meaningful, OR REPLACE. I work around a lot of missing IE/INE/OR by
using techniques like: conditioning on a schema query, using DROP IF
EXISTS then CREATE in a transaction (when the DROP has IE but the CREATE
does not have INE), catching exceptions, and so on.

These are little things -- quality of life sorts of things :)

I've also grown accustomed to writing complex pg_catalog queries. It'd
be nice to have some built-in views on the pg_catalog -- something
better than the information_schema. I have written some that we use for
code generation based on PG schemas; we'd be glad to contribute them.

Nico
--

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-09-29 21:17:42 Re: SendRowDescriptionMessage() is slow for queries with a lot of columns
Previous Message Tom Lane 2017-09-29 20:44:42 Re: Shaky coding for vacuuming partitioned relations