On Mon, 15 Apr 2002 18:45:48 -0400
"Neil Conway" <nconway(at)klamath(dot)dyndns(dot)org> wrote:
> On Mon, 15 Apr 2002 18:24:43 -0400
> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> writes:
> > + if (tblinfo[i].adef_expr[j] != NULL && tblinfo[i].inhAttrDef[j] == 0)
> > + appendPQExpBuffer(q, "ALTER TABLE %s ALTER COLUMN %s SET DEFAULT %s;\n",
> > + tblinfo[i].relname, tblinfo[i].attnames[j],
> > + tblinfo[i].adef_expr[j]);
> > I think you need some fmtId calls here, else it will fail on mixed-case
> > names and suchlike.
> Ah, thanks for spotting that, Tom -- sorry for being careless.
> A revised patch is attached.
Apparently, you need to make two calls to appendPQExpBuffer() to
use fmtId() twice, because it uses a static buffer (thanks for
spotting this Tom).
Another revision of the patch is attached.
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC
In response to
pgsql-patches by date
|Next:||From: Hiroshi Inoue||Date: 2002-04-16 00:15:23|
|Subject: Re: ANSI Compliant Inserts|
|Previous:||From: Bruce Momjian||Date: 2002-04-15 23:46:20|
|Subject: Re: documentation fixes|