I'd like to either 1) execute an alter table to re-add a constraint only
if it doesn't exist or 2) have psql ignore the failure when setting it's
exit status. Any ideas on how to do either would be appreciated.
Posgres 8.1.2
Thanks,
Brian
Brian Cox wrote:
> I'd like to either 1) execute an alter table to re-add a constraint only
> if it doesn't exist or 2) have psql ignore the failure when setting it's
> exit status. Any ideas on how to do either would be appreciated.
I don't think there's a way to do that but you can look at the
pg_constraint table to see if it exists.
http://www.postgresql.org/docs/current/static/catalog-pg-constraint.html
--
Postgresql & php tutorials
http://www.designmagick.com/
Есть вопросы? Напишите нам!
✖
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера