Skip site navigation (1) Skip section navigation (2)

Re: default values for views

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: default values for views
Date: 2002-04-24 02:42:46
Message-ID: 200204240242.g3O2gkH24335@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Oops, previous version backed out.  New patch applied.  Doc patch again
already covered in the current SGML.

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

Neil Conway wrote:
> 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.
> 
> Cheers,
> 
> Neil
> 
> -- 
> Neil Conway <neilconway(at)rogers(dot)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(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-patches by date

Next:From: Bruce MomjianDate: 2002-04-24 02:44:15
Subject: Re: pg_dump code cleanup
Previous:From: Bruce MomjianDate: 2002-04-24 02:40:50
Subject: Re: default values for views

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group