I mean that you can't easily base a foreign key constraint on a field
that is not NOT NULL UNIQUE.
- Rowan
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PRO
If my tables have one or more UNIQUE constraints/indices, I still add a
"id SERIAL PRIMARY KEY" field to most of my tables. This makes
referencing easier and faster. It also improves consistency, which is
never a bad thing in my opinion.
As far as I know, though, PRIMARY KEY does the same thing as
You can use an EXCEPT clause.
---(end of broadcast)---
TIP 6: explain analyze is your friend
Checking how your PgSQL statements are executed, can be done using
EXPLAIN [1].
EXPLAIN ANALYZE will also execute (but not dry-run!) your statement.
I work with a seperate development and production database. Once the
changes to the schema in the development DB are done, I commit them to
the prod
Your question is not clear at all.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cle
I'm not sure if this is true for you as I can't see your complete table
definitions, but I'd usually do this by using
issue_id INTEGER REFERENCES issue ON DELETE CASCADE
in my column definition.
See [1] for more information.
[1]http://www.postgresql.org/docs/current/interactive/ddl-constraint