Some wayfor checking/updating database/table structure?

From: Libor Vanek <libor(at)conet(dot)cz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Some wayfor checking/updating database/table structure?
Date: 2003-11-26 00:03:14
Message-ID: 3FC3EDC2.9060400@conet.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I'm looking for some way which could enable me to say:
- I have database DB_foo
- in this database is table T_bar
- table T_bar has got columns desc with text type and num with integer
type and default value 10

And if there is for example in T_bar only column "desc" I want to add
column "num".

Is there some simple way of doing this or must I always list
tables/columns and manualy check it? I imagine something like:

ALTER TABLE T_bar ADD COLUMN desc text IF NOT EXISTS;

Thanks for comments,
Libor

Browse pgsql-novice by date

  From Date Subject
Next Message Markus Walln 2003-11-26 10:05:32 Collate
Previous Message Ireneusz Kramarz 2003-11-25 20:54:57 how to create such a function??