| От | Cary B. O'Brien |
|---|---|
| Тема | Re: [INTERFACES] how to obtain column info |
| Дата | |
| Msg-id | 199811110134.UAA07958@access1.digex.net обсуждение |
| Ответ на | how to obtain column info ("Ken J. Wright" <ken@ori-ind.com>) |
| Ответы |
Re: [INTERFACES] how to obtain column info
|
| Список | pgsql-interfaces |
> With libpq, how do you obtain column info (like type) for a table *before* > returning a result set? For instance, knowing the column type before > constructing an insert statement. A date will need quotes, a number won't, > a string will, etc. > I usually do a 'select * from table_x where oid < 0' or something like that to get an empty result set. This might be a stupid thing to do on a big table, thought. You might want to select a column with an index. Anyone have a better idea? Actually, you should be able to get the information out of the pg_ tables. -- cary
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера