Re: Properties of 'Relationships' in FK definiton.

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'Anil Jangam'" <anilj(at)indts(dot)com>, "'pgsql-cygwin(at)postgresql(dot)org'" <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: Properties of 'Relationships' in FK definiton.
Date: 2001-12-14 13:16:22
Message-ID: FED2B709E3270E4B903EB0175A49BCB1047378@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

> -----Original Message-----
> From: Anil Jangam [mailto:anilj(at)indts(dot)com]
> Sent: 14 December 2001 12:33
> To: 'Dave Page'; 'pgsql-cygwin(at)postgresql(dot)org'
> Subject: Properties of 'Relationships' in FK definiton.
> Importance: High
>
>
> Hi Dave,
>
> After defining the FK relationship in one of the tables, the
> pgAdmin generates the view as follows.
>
> Foreign Keys [2]
> - PrimaryCompID -> FunctionEntityInventory
> - Relationships[1]
> - SecondaryCompID -> FunctionEntityInventory
> - Relationships[1]
>
> Here as shown, the 'PrimaryCompID' is a FK in table
> 'FunctionEntityInventory' and so the 'SecondaryCompID'.
>
> When I click on the 'PrimaryCompID' and 'SecondaryCompID', it
> shows the properties on the RHS (right hand side). But when I
> try to see the properties of 'Relationships' it gives the
> following error.
>
> An error has occured in pgAdminII:frmMain.tvNodeClick:
> Number: 5
> Description: Invalid procedure call or argument.
>
> What is the meaning of this???

What version if pgAdmin are you running - I can't seem to reproduce this?

> I have defined while creating the FK and its relationships
> correctly. But couldn't understand the meaning of
> 'deferrable' key word. Also in the properties of the FK, it
> shows some options:
>
> deferrable: No (I didn't checked this while creating the r'ship)
> Initally: Immidiate (What is the meaning and use
> of this???
> There were two things to select here..
> (immidiate,
> and deferred).

From the CREATE TABLE page in the PostgreSQL reference manual (available
under Help -> Contents in newer versions of pgAdmin):

DEFERRABLE or NOT DEFERRABLE
This controls whether the constraint can be deferred. A constraint that is
not deferrable will be checked immediately after every command. Checking of
constraints that are deferrable may be postponed until the end of the
transaction (using the SET CONSTRAINTS command). NOT DEFERRABLE is the
default. Only foreign key constraints currently accept this clause. All
other constraint types are not deferrable.

INITIALLY IMMEDIATE or INITIALLY DEFERRED
If a constraint is deferrable, this clause specifies the default time to
check the constraint. If the constraint is INITIALLY IMMEDIATE, it is
checked after each statement. This is the default. If the constraint is
INITIALLY DEFERRED, it is checked only at the end of the transaction. The
constraint check time can be altered with the SET CONSTRAINTS command.

> System FK: NO. (What is the system FK??)

pgAdmin has a concept of System Objects, that is, objects that were not
created explicitly by the user. In the case of Foreign Keys, you probably
will not see any with current PostgreSQL releases, but (for example) the
table pg_class would be marked as a system table, as would an index that was
automatically created when a column in a new table was defined as a Primary
Key. By default, all system objects are hidden - you can toggle the option
on the View menu to change this behaviour.

Regards, Dave.

Browse pgsql-cygwin by date

  From Date Subject
Next Message Dave Page 2001-12-14 13:26:23 Re: Requirement for pgAdmin browser.
Previous Message Anil Jangam 2001-12-14 13:04:06 Requirement for pgAdmin browser.