Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-26 Thread Fujii Masao
On 2021/10/25 21:27, Bharath Rupireddy wrote: On Mon, Oct 25, 2021 at 4:36 PM Fujii Masao wrote: On 2021/10/25 16:44, Bharath Rupireddy wrote: Yeah, let's focus on fixing the hint message here and the alter_foreign_data_wrapper_options_v3.patch LGTM. Thanks! But since v3 changed the error

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-25 Thread Bharath Rupireddy
On Mon, Oct 25, 2021 at 4:36 PM Fujii Masao wrote: > On 2021/10/25 16:44, Bharath Rupireddy wrote: > > Yeah, let's focus on fixing the hint message here and the > > alter_foreign_data_wrapper_options_v3.patch LGTM. > > Thanks! But since v3 changed the error codes, I got rid of those > changes and

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-25 Thread Fujii Masao
On 2021/10/25 16:44, Bharath Rupireddy wrote: Yeah, let's focus on fixing the hint message here and the alter_foreign_data_wrapper_options_v3.patch LGTM. Thanks! But since v3 changed the error codes, I got rid of those changes and made v4 patch. Attached. Why didn't we have a test case for

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-25 Thread Bharath Rupireddy
On Mon, Oct 25, 2021 at 12:00 PM Fujii Masao wrote: > On 2021/10/16 19:43, Bharath Rupireddy wrote: > > I'm fine with the distinction that's made, now I'm thinking about the > > appropriate areas where ERRCODE_FDW_INVALID_OPTION_NAME can be used. > > Is it correct to use ERRCODE_FDW_INVALID_OPTION

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-25 Thread Bharath Rupireddy
On Mon, Oct 25, 2021 at 12:00 PM Fujii Masao wrote: > > On 2021/10/16 19:43, Bharath Rupireddy wrote: > > I'm fine with the distinction that's made, now I'm thinking about the > > appropriate areas where ERRCODE_FDW_INVALID_OPTION_NAME can be used. > > Is it correct to use ERRCODE_FDW_INVALID_OPTI

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-24 Thread Fujii Masao
On 2021/10/16 19:43, Bharath Rupireddy wrote: I'm fine with the distinction that's made, now I'm thinking about the appropriate areas where ERRCODE_FDW_INVALID_OPTION_NAME can be used. Is it correct to use ERRCODE_FDW_INVALID_OPTION_NAME in postgresImportForeignSchema where we don't check buff

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-16 Thread Bharath Rupireddy
On Wed, Oct 13, 2021 at 11:06 PM Fujii Masao wrote: > On 2021/10/13 14:00, Bharath Rupireddy wrote: > > On Tue, Oct 12, 2021 at 11:11 PM Fujii Masao > > wrote: > >> BTW, I found file_fdw.c, dblink.c, postgres_fdw/option.c and foreign.c > >> use different error codes for the same error message as

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-13 Thread Fujii Masao
On 2021/10/13 14:00, Bharath Rupireddy wrote: On Tue, Oct 12, 2021 at 11:11 PM Fujii Masao wrote: BTW, I found file_fdw.c, dblink.c, postgres_fdw/option.c and foreign.c use different error codes for the same error message as follows. They should use the same error code? If yes, ISTM that ERRC

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-12 Thread Bharath Rupireddy
On Tue, Oct 12, 2021 at 11:11 PM Fujii Masao wrote: > BTW, I found file_fdw.c, dblink.c, postgres_fdw/option.c and foreign.c > use different error codes for the same error message as follows. > They should use the same error code? If yes, ISTM that > ERRCODE_FDW_INVALID_OPTION_NAME is better becau

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-12 Thread Fujii Masao
On 2021/10/12 19:57, bt21masumurak wrote: I made new patch based on those comments. Thanks for updating the patch! -errhint("HOGEHOGEValid options in this context are: %s", -buf.data))); The pat

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-12 Thread bt21masumurak
Hi Thank you for your comments. It seems like the change proposed for postgres_fdw_validator is similar to what file_fdw is doing in file_fdw_validator. I think we also need to do the same change in dblink_fdw_validator and postgresql_fdw_validator as well. Agreed. While on this, it's bet

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-08 Thread Daniel Gustafsson
> On 8 Oct 2021, at 09:38, Bharath Rupireddy > wrote: > > On Fri, Oct 8, 2021 at 12:48 PM bt21masumurak > wrote: >> >> Hi >> >> When 'ALTER FOREIGN DATA WRAPPER OPTIONS' is executed against >> postgres_fdw, the HINT message is printed as shown below, even though >> there are no valid options

Re: Improve the HINT message of the ALTER command for postgres_fdw

2021-10-08 Thread Bharath Rupireddy
On Fri, Oct 8, 2021 at 12:48 PM bt21masumurak wrote: > > Hi > > When 'ALTER FOREIGN DATA WRAPPER OPTIONS' is executed against > postgres_fdw, the HINT message is printed as shown below, even though > there are no valid options in this context. > > =# ALTER FOREIGN DATA WRAPPER postgres_fdw OPTIONS

Improve the HINT message of the ALTER command for postgres_fdw

2021-10-08 Thread bt21masumurak
Hi When 'ALTER FOREIGN DATA WRAPPER OPTIONS' is executed against postgres_fdw, the HINT message is printed as shown below, even though there are no valid options in this context. =# ALTER FOREIGN DATA WRAPPER postgres_fdw OPTIONS (format 'csv'); ERROR: invalid option "format" HINT: Valid opti