Re: force_not_null option support for file_fdw
От | Kohei Kaigai |
---|---|
Тема | Re: force_not_null option support for file_fdw |
Дата | |
Msg-id | D0C1A1F8BF513F469926E6C71461D9EC059195@EX10MBX02.EU.NEC.COM обсуждение исходный текст |
Ответ на | Re: force_not_null option support for file_fdw (Shigeru Hanada <shigeru.hanada@gmail.com>) |
Список | pgsql-hackers |
I marked this patch as "Ready for Committer", and hope this patch being committed. Thanks, -- NEC Europe Ltd, SAP Global Competence Center KaiGai Kohei <kohei.kaigai@emea.nec.com> > -----Original Message----- > From: Shigeru Hanada [mailto:shigeru.hanada@gmail.com] > Sent: 9. September 2011 06:03 > To: Kohei Kaigai > Cc: Kohei KaiGai; PostgreSQL-development > Subject: Re: [HACKERS] force_not_null option support for file_fdw > > Thanks for the review, Kaigai-san. > > (2011/09/09 0:47), Kohei Kaigai wrote: > > I found one other point to be fixed: > > On get_force_not_null(), it makes a list of attribute names with force_not_null option. > > > > + foreach (cell, options) > > + { > > + DefElem *def = (DefElem *) lfirst(cell); > > + const char *value = defGetString(def); > > + > > + if (strcmp(def->defname, "force_not_null") == 0&& > > + strcmp(value, "true") == 0) > > + { > > + columns = lappend(columns, makeString(NameStr(attr->attname))); > > + elog(DEBUG1, "%s: force_not_null", NameStr(attr->attname)); > > + } > > + > > + } > > > > makeString() does not copy the supplied string itself, so it is not > > preferable to reference > > NameStr(attr->attname) across ReleaseSysCache(). > > I'd like to suggest to supply a copied attname using pstrdup for > > makeString > > Oops, fixed. > [ I should check some of my projects for this issue... ] > > Attached patch also includes some cosmetic changes such as removing useless blank lines. > > Regards, > -- > Shigeru Hanada > > > Click > https://www.mailcontrol.com/sr/GQT1p8GGIBPTndxI!oX7UiqFKmKbqX6Rgam71Xs0JKL1UdBaye8DbxIe1v95RjzltL > 2w8BfevsSBchKRB0KEKw== to report this email as spam.
В списке pgsql-hackers по дате отправления: