| From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: default values for views |
| Date: | 2002-04-15 22:45:48 |
| Message-ID: | 20020415184548.65359b43.nconway@klamath.dyndns.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
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.
Cheers,
Neil
--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC
| Attachment | Content-Type | Size |
|---|---|---|
| rule_default_value-3.patch | application/octet-stream | 4.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2002-04-15 22:59:17 | Re: default values for views |
| Previous Message | Neil Conway | 2002-04-15 22:42:38 | pg_dump code cleanup |