comparison artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 195:63f555bbdbc0

Fix a foreign key constraint violation when deleting outdated artifacts. artifacts/trunk@1425 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 08 Mar 2011 10:35:40 +0000
parents 949d69ad3756
children 94654cbf8db2
comparison
equal deleted inserted replaced
194:fde2f193e846 195:63f555bbdbc0
8 data = ? WHERE id = ? 8 data = ? WHERE id = ?
9 9
10 artifacts.touch=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP WHERE id = ? 10 artifacts.touch=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP WHERE id = ?
11 11
12 artifacts.outdated=SELECT id, factory, data FROM artifacts WHERE ttl IS NOT NULL \ 12 artifacts.outdated=SELECT id, factory, data FROM artifacts WHERE ttl IS NOT NULL \
13 AND CURRENT_TIMESTAMP - last_access > (ttl || ' microseconds')::interval LIMIT 50 13 AND CURRENT_TIMESTAMP - last_access > (ttl || ' microseconds')::interval \
14 AND id NOT IN (SELECT UNIQUE artifact_id FROM collection_items) \
15 LIMIT 50
14 16
15 artifacts.select.gid=SELECT id, last_access, ttl, factory, data FROM artifacts WHERE gid = ?::uuid 17 artifacts.select.gid=SELECT id, last_access, ttl, factory, data FROM artifacts WHERE gid = ?::uuid
16 18
17 artifacts.get.id=SELECT id FROM artifacts WHERE gid = ?::uuid 19 artifacts.get.id=SELECT id FROM artifacts WHERE gid = ?::uuid
18 20

http://dive4elements.wald.intevation.org