Re: IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements

From: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements
Date: 2017-03-15 11:28:24
Message-ID: CAKNkYnxmuH+kVqBZOaK8VGSE9=tXc6WcSokAmr_eLw-59jGbbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2017-03-14 15:55 GMT+03:00 Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>:
>
> I noticed that the earlier error message was using "server" instead of
> "foreign server", while the new message uses the later one. Usually,
> when converting an error to notice, we don't expect such changes. But
> many other error messages are using "foreign server" instead of
> "server", so probably this one needed a change anyway. But then, the
> command to create a foreign server is not "CREATE FOREIGN SERVER",
> it's "CREATE SERVER", so users are already getting confused?

Actually, there are other messages with "server". For example, in the
AlterForeignServerOwner() or in the postgres_fdw code.
Maybe it is better to not change "server" to "foreign server" in
"create_foreign_server_if_not_exists.patch"? I think it will be better
to fix all such messages with a separate patch, If we will decide that
it is necessary to change "server" messages.

>
> I don't see similar change in the error message for the user mapping.
> Do we need to change "server" to "foreign server" in case of user
> mapping? The doc changes didn't compile with error
> "osx:ref/create_user_mapping.sgml:52:15:E: document type does not
> allow element "VARLISTENTRY" here; assuming missing "VARIABLELIST"

Indeed! Missed that.

--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sachin Kotwal 2017-03-15 11:38:51 Re: Allow pg_dumpall to work without pg_authid
Previous Message Robert Haas 2017-03-15 11:17:08 Re: GSOC - TOAST'ing in slices