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

From Neil Conway
Subject Re: default values for views
Date
Msg-id 20020415184548.65359b43.nconway@klamath.dyndns.org
Whole thread Raw
In response to Re: default values for views  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: default values for views
List pgsql-patches
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.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Attachment

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: pg_dump code cleanup
Next
From: Bruce Momjian
Date:
Subject: Re: default values for views