How to add “on delete cascade” constraints?

In PostgreSQL 8 is it possible to add ON DELETE CASCADES to the both foreign keys in the following table without dropping the latter? # \d scores Table “public.scores” Column | Type | Modifiers ———+———————–+———– id | character varying(32) | gid | integer | money | integer | not null quit | boolean | last_ip … Read more

Generating a UUID in Postgres for Insert statement?

My question is rather simple. I’m aware of the concept of a UUID and I want to generate one to refer to each ‘item’ from a ‘store’ in my DB with. Seems reasonable right? The problem is the following line returns an error: honeydb=# insert into items values( uuid_generate_v4(), 54.321, 31, ‘desc 1’, 31.94); ERROR: … Read more