Re: default values for views - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: default values for views
Date
Msg-id 200204180444.g3I4iGl11963@candle.pha.pa.us
Whole thread Raw
In response to Re: default values for views  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-patches
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Neil Conway wrote:
> On Mon, 15 Apr 2002 18:45:48 -0400
> "Neil Conway" <nconway@klamath.dyndns.org> wrote:
> > On Mon, 15 Apr 2002 18:24:43 -0400
> > "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> > > Neil Conway <nconway@klamath.dyndns.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.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilconway@rogers.com>
> PGP Key ID: DB3C29FC

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Doc fix for INSERT ... (DEFAULT, ...)
Next
From: Bruce Momjian
Date:
Subject: Re: pg_dump code cleanup