pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedlost in system tables
5+ messages / 3 participants
[nested] [flat]
* lost in system tables
@ 2005-12-06 15:47 Emil Rachovsky <zsevgymko@yahoo.com>
2005-12-06 16:34 ` Re: lost in system tables Luca Pireddu <luca@cs.ualberta.ca>
2005-12-06 17:12 ` Re: [SQL] lost in system tables Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 5+ messages in thread
From: Emil Rachovsky @ 2005-12-06 15:47 UTC (permalink / raw)
To: pgsql-general@postgresql.org; pgsql-sql
I am trying to find the equivalent of these two
Sybase system columns :
check_on_commit (Y/N) - Indicates whether INSERT and
UPDATE commands should wait until the next COMMIT
command to check if foreign keys are valid. A foreign
key is valid if, for each row in the foreign table,
the values in the columns of the foreign key either
contain the NULL value or match the primary key values
in some row of the primary table.
nulls (Y/N) - Indicates whether the columns in the
foreign key are allowed to contain the NULL value.
Note that this setting is independent of the nulls
setting in the columns contained in the foreign key.
Maybe pg_constaint.condeferrable is appropriate for
check_on_commit? I'll appreciate any help
Thanks in advance,
Emil
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: lost in system tables
2005-12-06 15:47 lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
@ 2005-12-06 16:34 ` Luca Pireddu <luca@cs.ualberta.ca>
2005-12-07 07:39 ` Re: [SQL] lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
1 sibling, 1 reply; 5+ messages in thread
From: Luca Pireddu @ 2005-12-06 16:34 UTC (permalink / raw)
To: pgsql-general@postgresql.org; +Cc: pgsql-sql
On Tuesday 06 December 2005 08:47, Emil Rachovsky wrote:
> I am trying to find the equivalent of these two
> Sybase system columns :
>
> check_on_commit (Y/N) - Indicates whether INSERT and
> UPDATE commands should wait until the next COMMIT
> command to check if foreign keys are valid. A foreign
> key is valid if, for each row in the foreign table,
> the values in the columns of the foreign key either
> contain the NULL value or match the primary key values
> in some row of the primary table.
>
> nulls (Y/N) - Indicates whether the columns in the
> foreign key are allowed to contain the NULL value.
> Note that this setting is independent of the nulls
> setting in the columns contained in the foreign key.
>
> Maybe pg_constaint.condeferrable is appropriate for
> check_on_commit? I'll appreciate any help
>
> Thanks in advance,
> Emil
Those parameters are specified when you declare the foreign key. Look here,
in the section describing "references":
http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html
Luca
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] lost in system tables
2005-12-06 15:47 lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
2005-12-06 16:34 ` Re: lost in system tables Luca Pireddu <luca@cs.ualberta.ca>
@ 2005-12-07 07:39 ` Emil Rachovsky <zsevgymko@yahoo.com>
0 siblings, 0 replies; 5+ messages in thread
From: Emil Rachovsky @ 2005-12-07 07:39 UTC (permalink / raw)
To: luca@cs.ualberta.ca; +Cc: pgsql-general@postgresql.org; pgsql-sql
> Those parameters are specified when you declare the
> foreign key. Look here,
> in the section describing "references":
>
http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html
>
> Luca
Thank you,Luca
I know that these parameters are specified when you
declare the foreign key, but i need to check them out
later from the system tables. The first one must be
something like the 'deferrable' column in
pg_constaint, but the second is still in vague.
Emil
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] lost in system tables
2005-12-06 15:47 lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
@ 2005-12-06 17:12 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-12-07 07:26 ` Re: [SQL] lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2005-12-06 17:12 UTC (permalink / raw)
To: Emil Rachovsky <zsevgymko@yahoo.com>; +Cc: pgsql-general@postgresql.org; pgsql-sql
Emil Rachovsky <zsevgymko@yahoo.com> writes:
> I am trying to find the equivalent of these two
> Sybase system columns :
> check_on_commit (Y/N) - Indicates whether INSERT and
> UPDATE commands should wait until the next COMMIT
> command to check if foreign keys are valid.
I think you are looking for the DEFERRABLE/DEFERRED option of foreign
key constraints.
> nulls (Y/N) - Indicates whether the columns in the
> foreign key are allowed to contain the NULL value.
> Note that this setting is independent of the nulls
> setting in the columns contained in the foreign key.
No such animal in the SQL standard --- though perhaps MATCH FULL
is approximately what you are looking for? Your description as
stated makes no sense at all; either the columns are allowed to
be null, or they're not.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] lost in system tables
2005-12-06 15:47 lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
2005-12-06 17:12 ` Re: [SQL] lost in system tables Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-12-07 07:26 ` Emil Rachovsky <zsevgymko@yahoo.com>
0 siblings, 0 replies; 5+ messages in thread
From: Emil Rachovsky @ 2005-12-07 07:26 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@postgresql.org; pgsql-sql
Thank you,Tom,
As for the description of 'nulls' I have taken it as
it is from the Sybase help file :)
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-12-07 07:39 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 15:47 lost in system tables Emil Rachovsky <zsevgymko@yahoo.com>
2005-12-06 16:34 ` Luca Pireddu <luca@cs.ualberta.ca>
2005-12-07 07:39 ` Emil Rachovsky <zsevgymko@yahoo.com>
2005-12-06 17:12 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-12-07 07:26 ` Emil Rachovsky <zsevgymko@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox