From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Logan Owen <pgsql(at)s1devops(dot)com> |
Cc: | Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Server postgres_fdw "fetch_size" option cannot be updated |
Date: | 2017-12-28 20:42:45 |
Message-ID: | CAMkU=1wDtOesTnk0VWSbB6=st2N+HpS6XvcBw9PX+M8tqj2=gg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Dec 28, 2017 at 12:33 PM, Logan Owen <pgsql(at)s1devops(dot)com> wrote:
> Hi everyone,
>
> I'm playing around with postgres_fdw (version 1.0), and ran into an issue
> where I wanted to update the "fetch_size" option on the server level:
>
> sql> CREATE SERVER test_remote FOREIGN DATA WRAPPER postgres_fdw OPTIONS
> (host 'postgres2', dbname 'test', updatable 'false')
> [2017-12-28 10:30:13] completed in 35ms
> sql> ALTER SERVER test_remote OPTIONS (set fetch_size '50')
> [2017-12-28 10:30:26] [42704] ERROR: option "fetch_size" not found
>
> However, I am able to properly set the "fetch_size" when originally
> defining the server:
>
> sql> CREATE SERVER test_remote2 FOREIGN DATA WRAPPER postgres_fdw OPTIONS
> (host 'postgres2', dbname 'test', updatable 'false', fetch_size '50')
> [2017-12-28 10:31:26] completed in 24ms
>
>
You use 'set' only if a value already exists and you wish to change it.
Since no value exists (the default does not count), you just do
ALTER SERVER test_remote OPTIONS (fetch_size '50');
Yes, this is confusing. But it is also documented, and I think it is
required by the SQL/MED standard.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Logan Owen | 2017-12-28 20:53:10 | Re: Server postgres_fdw "fetch_size" option cannot be updated |
Previous Message | Logan Owen | 2017-12-28 20:33:14 | Server postgres_fdw "fetch_size" option cannot be updated |