pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedNew Column existing table + View
2+ messages / 2 participants
[nested] [flat]
* New Column existing table + View
@ 2016-01-07 22:43 drum.lucas@gmail.com <drum.lucas@gmail.com>
2016-01-08 09:16 ` Re: New Column existing table + View Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
0 siblings, 1 reply; 2+ messages in thread
From: drum.lucas@gmail.com @ 2016-01-07 22:43 UTC (permalink / raw)
To: pgsql-admin
Hi all!
Question 1:
I want to add a new column to a base table, and add that new column to an
existing view...
So all selects/updates/deletes translate back to the original table
How can I do that?
VARCHAR(255) or TEXT
nullable
and CRUDs on the view to apply to the table
Thanks
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: New Column existing table + View
2016-01-07 22:43 New Column existing table + View drum.lucas@gmail.com <drum.lucas@gmail.com>
@ 2016-01-08 09:16 ` Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
0 siblings, 0 replies; 2+ messages in thread
From: Gunnar \"Nick\" Bluth @ 2016-01-08 09:16 UTC (permalink / raw)
To: pgsql-admin
Am 07.01.2016 um 23:43 schrieb drum.lucas@gmail.com:
> Hi all!
>
> Question 1:
>
> I want to add a new column to a base table, and add that new column to
> an existing view...
>
> So all selects/updates/deletes translate back to the original table
>
> How can I do that?
1a) ALTER TABLE
1b) CREATE OR REPLACE VIEW (assuming you have your initial CREATE VIEW
statement still around, just add the additional column and add the "OR
REPLACE")
1c) See
http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-auto-updatable-views/
if that fits your needs.
Cheers,
--
Gunnar "Nick" Bluth
DBA ELSTER
Tel: +49 911/991-4665
Mobil: +49 172/8853339
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-01-08 09:16 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 22:43 New Column existing table + View drum.lucas@gmail.com <drum.lucas@gmail.com>
2016-01-08 09:16 ` Gunnar "Nick" Bluth <gunnar.bluth.extern@elster.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox