Re: Bug in SQL/MED?
От | Shigeru Hanada |
---|---|
Тема | Re: Bug in SQL/MED? |
Дата | |
Msg-id | 4E0D98D0.8030408@gmail.com обсуждение исходный текст |
Ответ на | Re: Bug in SQL/MED? (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: Bug in SQL/MED?
Re: Bug in SQL/MED? |
Список | pgsql-hackers |
2011/6/30 Alvaro Herrera <alvherre@commandprompt.com>: > Excerpts from 花田 茂's message of jue jun 30 06:00:23 -0400 2011: > >> I attached a patch which fixes file_fdw to check required option >> (filename) in its validator function. I think that such requirement >> should be checked again in PlanForeignScan(), as it had been so far. >> Note that this patch requires fdw.patch has been applied. > > I think it'd be good to keep the error check in fileGetOptions() just to > ensure that we don't crash in case a catalog is messed up with, though > I'd degrade it to elog(ERROR) from ereport. Thanks for the comments. Please find attached a patch. Now file_fdw validates filename in: * file_fdw_validator(), to catch lack of required option at DDL * fileGetOptions(), to avoid crash caused by corrupted catalog I used ereport for the former check, because maybe such error usually happens and is visible to users. This criteria was taken from the document "Reporting Errors Within the Server". http://developer.postgresql.org/pgdocs/postgres/error-message-reporting.html Regards, -- Shigeru Hanada
Вложения
В списке pgsql-hackers по дате отправления: