| От | Jim C. Nasby |
|---|---|
| Тема | Re: [SQL] add column if doesn't exist (fwd) |
| Дата | |
| Msg-id | 20050929205038.GN30974@pervasive.com обсуждение исходный текст |
| Ответ на | Re: [SQL] add column if doesn't exist (fwd) ("Qingqing Zhou" <zhouqq@cs.toronto.edu>) |
| Список | pgsql-general |
On Mon, Sep 26, 2005 at 07:16:53PM -0700, Qingqing Zhou wrote: > > ""Brandon Metcalf"" <bmetcalf@nortel.com> wrote > > > > Is there a way to check for the existence of a column in a table other > > than, say, doing a SELECT on that column name and checking the output? > > > > Take a look at pg_attribute system table. > http://www.postgresql.org/docs/8.0/static/catalog-pg-attribute.html You might find the information_schema or pg_newsysviews (http://pgfoundry.org/projects/newsysviews/) easier to use. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера