If I wanted to create a table in such a way that the default value of one column is the value of another column (or the oid value), is there a way to do that in the CREATE TABLE statement (with the DEFAULT keyword, I'd imagine)? Or would I need to create a trigger? -- Bruce
From: "Bruce Richardson" <brichard@cafod.org.uk> > If I wanted to create a table in such a way that the default value of > one column is the value of another column (or the oid value), is there > a way to do that in the CREATE TABLE statement (with the DEFAULT > keyword, I'd imagine)? Or would I need to create a trigger? > > -- > Bruce Trigger AFAIK. I've used functions in DEFAULTs but get errors with references to another column. I presume it's because the system can't tell whether your mean OLD.col or NEW.col - Richard Huxton
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера