aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/sql/postgres_fdw.sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-03-05 15:37:23 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-03-05 15:37:34 -0500
commit722408bcd1bde0b007f73b41135382af11b0282d (patch)
tree6dc2efc7d1b77b2a9b3acc3df68e47a6956c402a /contrib/postgres_fdw/sql/postgres_fdw.sql
parent42d7074ebb832e511d1edec8091cd474d169eef1 (diff)
downloadpostgresql-722408bcd1bde0b007f73b41135382af11b0282d.tar.gz
postgresql-722408bcd1bde0b007f73b41135382af11b0282d.zip
Add infrastructure to support server-version-dependent tab completion.
Up to now we've not worried about whether psql's tab completion queries would work against prior server versions. But since we support older server versions in describe.c, we really ought to do so here as well. Failing to take care of this not only leads to loss of tab-completion service when using an older server, but risks aborting a user's open transaction when we send an incompatible query to the server. The recent changes in pg_proc.prokind are one reason to take this more seriously now than before, and the proposed patch for completion after SELECT needs some such capability as well. Hence, create some infrastructure to allow selection of one of several versions of a query depending on server version. For cases where we just need to select one of several query strings, introduce VersionedQuery and COMPLETE_WITH_VERSIONED_QUERY(). Likewise extend the SchemaQuery infrastructure to allow versioning of those. I went ahead and fixed the prokind issues, to serve as an illustration of how to use versioned SchemaQuery. To have some illustration of VersionedQuery, change the support for completion of publication and subscription names so that psql will not send sure-to-fail queries to pre-v10 servers. There is much more that should be done to make tab completion more friendly to older servers, but this commit is mainly meant to get the infrastructure in place, so I stopped here. Discussion: https://postgr.es/m/24314.1520190408@sss.pgh.pa.us
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
0 files changed, 0 insertions, 0 deletions