Re: 'UNIQUE'
От | Tom Lane |
---|---|
Тема | Re: 'UNIQUE' |
Дата | |
Msg-id | 6083.1047912705@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | 'UNIQUE' (Ben Clewett <B.Clewett@roadrunner.uk.com>) |
Список | pgsql-novice |
Ben Clewett <B.Clewett@roadrunner.uk.com> writes: > Does 'UNIQUE' allow multiple 'NULL' entries? Yes; this is per SQL spec. > But I am wondering if PostgreSQL > stores the last write timestamp to a table somewhere where it can be > checked easily? No --- Postgres doesn't keep track of that at all. For the particular situation you are describing, I don't think you really want timestamps per se. What you want is a trigger that will send a NOTIFY message when the table changes. Apps with dependent state (like combobox entries) can LISTEN for this message and then rebuild their local state when they get it. This is much more efficient than putting a timestamp someplace, because the recipients don't have to waste cycles probing to find out if there's been an update. regards, tom lane
В списке pgsql-novice по дате отправления: