Re: force_not_null option support for file_fdw

From: Kohei Kaigai <Kohei(dot)Kaigai(at)EMEA(dot)NEC(dot)COM>
To: Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Cc: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: force_not_null option support for file_fdw
Date: 2011-09-09 17:01:40
Message-ID: D0C1A1F8BF513F469926E6C71461D9EC059195@EX10MBX02.EU.NEC.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)kaigai(at)emea(dot)nec(dot)com>

> -----Original Message-----
> From: Shigeru Hanada [mailto:shigeru(dot)hanada(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-09-09 17:30:57 Re: Moving core timestamp typedefs/macros somewhere else
Previous Message Robert Haas 2011-09-09 15:32:46 Re: pg_last_xact_insert_timestamp