Some wayfor checking/updating database/table structure?

Поиск
Список
Период
Сортировка
От Libor Vanek
Тема Some wayfor checking/updating database/table structure?
Дата
Msg-id 3FC3EDC2.9060400@conet.cz
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Jukka Ylönen
Дата:
Сообщение: Re: about psql functions...
Следующее
От: "big_mafa"
Дата:
Сообщение: Transaction in plpgsql function?