'UNIQUE'
От | Ben Clewett |
---|---|
Тема | 'UNIQUE' |
Дата | |
Msg-id | 3E75DCC5.9040208@roadrunner.uk.com обсуждение исходный текст |
Ответ на | Re: getting started (<ghaverla@freenet.edmonton.ab.ca>) |
Ответы |
Re: 'UNIQUE'
Re: 'UNIQUE' |
Список | pgsql-novice |
Hi, To describe an optional 1:1 reference I am using the 'UNIQUE' keyword: key_foo INT UNIQUE, FOREIGN KEY (key_foo) REFERENCES .... Does 'UNIQUE' allow multiple 'NULL' entries? Ie: key_foo ------- 1 2 NULL 9 8 NULL 4 NULL If as I expect, this is not the case, could anybody recommend another way of forming an optional 1:1 reference? --------x-------X-------x-------- I have a problem of 'stale' data. I want to produce combo-box's of selectable options, which are PK's of a table. In order to enhance the system, I want to be lazy and store the values in the control. To do this I need some way of telling when the source table / view is out of date and the data has changed. I could set up Triggers to amend some lookup table containing a timestamp of the change for a table. But I am wondering if PostgreSQL stores the last write timestamp to a table somewhere where it can be checked easily? Thanks again, Ben Clewett.
В списке pgsql-novice по дате отправления: