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

Re: default values for views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: default values for views
Date: 2002-04-15 22:24:43
Message-ID: (view raw or whole thread)
Lists: pgsql-patches
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.

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2002-04-15 22:42:38
Subject: pg_dump code cleanup
Previous:From: Neil ConwayDate: 2002-04-15 22:19:43
Subject: default values for views

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