Some wayfor checking/updating database/table structure? - Mailing list pgsql-novice

From Libor Vanek
Subject Some wayfor checking/updating database/table structure?
Date
Msg-id 3FC3EDC2.9060400@conet.cz
Whole thread Raw
List 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






pgsql-novice by date:

Previous
From: Jukka Ylönen
Date:
Subject: Re: about psql functions...
Next
From: "big_mafa"
Date:
Subject: Transaction in plpgsql function?