Fw: View column defaults in pgAdminIII

From: "Donald Fraser" <demolish(at)cwgsy(dot)net>
To: "[pgADMIN]" <pgadmin-support(at)postgresql(dot)org>
Subject: Fw: View column defaults in pgAdminIII
Date: 2003-10-13 14:49:25
Message-ID: 003f01c39199$35be8cd0$1664a8c0@DEMOLITION
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support


----- Original Message -----
From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <btober(at)seaworthysys(dot)com>; <pgadmin-support(at)postgresql(dot)org>
Sent: Monday, October 13, 2003 3:17 PM
Subject: Re: [pgadmin-support] View column defaults in pgAdminIII

<snip>

>> b) Include in the view definition DDL any column defaults.
>> When I do a pg_dump -t myview... at the server console, the
>> output includes not only the view DDL, rules, and
>> permissions, but also column defaults. Would be nice for the
>> sake of completeness to see the column defaults in the
>> pgAdminIII DDL also.

>I'm not sure what you mean here. Views don't have column defaults, only
>the underlying relations do. How would you expect that to be expressed
>in SQL (which pg_dump didn't do when I tried it btw)?

>Regards, Dave.

Sorry but I believe you are mistaken on this one.
For example to set the default value of a column of a view you issue the
command which is very similar to that of a table:
Example: ALTER TABLE vu_someview ALTER COLUMN b_somecolumn SET DEFAULT '0';

Regards
Donald Fraser.

Browse pgadmin-support by date

  From Date Subject
Next Message Dave Page 2003-10-13 14:50:28 FW: View column defaults in pgAdminIII
Previous Message Dave Page 2003-10-13 14:17:57 Re: View column defaults in pgAdminIII