types of constraint deferment

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron Johnson

    types of constraint deferment

    Hi,

    v7.3.3


    Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"? If so,
    what does it do, since they seem contradictory.

    Thanks
    --
    +---------------------------------------------------------------+
    | Ron Johnson, Jr. Home: ron.l.johnson@c ox.net |
    | Jefferson, LA USA |
    | |
    | "Man, I'm pretty. Hoo Hah!" |
    | Johnny Bravo |
    +---------------------------------------------------------------+



    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo@postg resql.org so that your
    message can get through to the mailing list cleanly

  • Stephan Szabo

    #2
    Re: types of constraint deferment


    On 11 Aug 2003, Ron Johnson wrote:
    [color=blue]
    > v7.3.3
    > http://www.postgresql.org/docs/7.3/s...eatetable.html
    >
    > Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"? If so,
    > what does it do, since they seem contradictory.[/color]

    It's not allowed. An INITIALLY DEFERRED constraint must not
    be defined as NOT DEFERRABLE, although an INITIALLY DEFERRED
    constraint that doesn't specify either is considered DEFERRABLE.
    The docs refered to are weak on this, care to try a rewrite of
    those parts? :)


    ---------------------------(end of broadcast)---------------------------
    TIP 1: subscribe and unsubscribe commands go to majordomo@postg resql.org

    Comment

    • Dennis Gearon

      #3
      Re: types of constraint deferment

      I don't believe they work together.

      Ron Johnson wrote:
      [color=blue]
      > Hi,
      >
      > v7.3.3
      > http://www.postgresql.org/docs/7.3/s...eatetable.html
      >
      > Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"? If so,
      > what does it do, since they seem contradictory.
      >
      > Thanks[/color]


      ---------------------------(end of broadcast)---------------------------
      TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

      Comment

      • Ron Johnson

        #4
        Re: types of constraint deferment

        On Tue, 2003-08-12 at 00:38, Stephan Szabo wrote:[color=blue]
        > On 11 Aug 2003, Ron Johnson wrote:
        >[color=green]
        > > v7.3.3
        > > http://www.postgresql.org/docs/7.3/s...eatetable.html
        > >
        > > Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"? If so,
        > > what does it do, since they seem contradictory.[/color]
        >
        > It's not allowed. An INITIALLY DEFERRED constraint must not
        > be defined as NOT DEFERRABLE, although an INITIALLY DEFERRED
        > constraint that doesn't specify either is considered DEFERRABLE.
        > The docs refered to are weak on this, care to try a rewrite of
        > those parts? :)[/color]

        Sure, after I know what the rules are!!!!!

        --
        +---------------------------------------------------------------+
        | Ron Johnson, Jr. Home: ron.l.johnson@c ox.net |
        | Jefferson, LA USA |
        | |
        | "Man, I'm pretty. Hoo Hah!" |
        | Johnny Bravo |
        +---------------------------------------------------------------+



        ---------------------------(end of broadcast)---------------------------
        TIP 1: subscribe and unsubscribe commands go to majordomo@postg resql.org

        Comment

        • Stephan Szabo

          #5
          Re: types of constraint deferment


          On 12 Aug 2003, Ron Johnson wrote:
          [color=blue]
          > On Tue, 2003-08-12 at 00:38, Stephan Szabo wrote:[color=green]
          > > On 11 Aug 2003, Ron Johnson wrote:
          > >[color=darkred]
          > > > v7.3.3
          > > > http://www.postgresql.org/docs/7.3/s...eatetable.html
          > > >
          > > > Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"? If so,
          > > > what does it do, since they seem contradictory.[/color]
          > >
          > > It's not allowed. An INITIALLY DEFERRED constraint must not
          > > be defined as NOT DEFERRABLE, although an INITIALLY DEFERRED
          > > constraint that doesn't specify either is considered DEFERRABLE.
          > > The docs refered to are weak on this, care to try a rewrite of
          > > those parts? :)[/color]
          >
          > Sure, after I know what the rules are!!!!![/color]

          Basically, you can specify one of the following states on the constraint
          (unless I'm missing something)

          Neither a check time nor a deferrability, in which case you get
          NOT DEFERRABLE INITIALLY IMMEDIATE
          No check time and NOT DEFERRABLE, in which case you get
          NOT DEFERRABLE INITIALLY IMMEDIATE
          No check time and DEFERRABLE, in which case you get
          DEFERRABLE INITIALLY IMMEDIATE
          A check time of INITIALLY IMMEDIATE and no deferrability, in which case
          you get NOT DEFERRABLE INITIALLY IMMEDIATE
          A check time of INITIALLY DEFERRED and no deferrability, in which case
          you get DEFERRABLE INITIALLY DEFERRED
          A check time of INITIALLY IMMEDIATE and NOT DEFERRABLE, in which case
          you get NOT DEFERRABLE INITIALLY IMMEDIATE
          A check time of INITIALLY IMMEDIATE and DEFERRABLE, in which case
          you get DEFERRABLE INITIALLY IMMEDIATE
          A check time of INITIALLY DEFERRED and DEFERRABLE, in which case
          you get DEFERRABLE INITIALLY DEFERRED
          A check time of INITIALLY DEFERRED and NOT DEFERRABLE is an error
          condition.



          ---------------------------(end of broadcast)---------------------------
          TIP 7: don't forget to increase your free space map settings

          Comment

          • Dennis Gearon

            #6
            Re: types of constraint deferment

            Boy, that'd be nice to have in the manual!

            Stephan Szabo wrote:
            [color=blue]
            > On 12 Aug 2003, Ron Johnson wrote:
            >
            >[color=green]
            >>On Tue, 2003-08-12 at 00:38, Stephan Szabo wrote:
            >>[color=darkred]
            >>>On 11 Aug 2003, Ron Johnson wrote:
            >>>
            >>>
            >>>>v7.3.3
            >>>>http://www.postgresql.org/docs/7.3/s...eatetable.html
            >>>>
            >>>>Is "INITIALLY DEFERRED" a modifier of "NOT DEFERRABLE"? If so,
            >>>>what does it do, since they seem contradictory.
            >>>
            >>>It's not allowed. An INITIALLY DEFERRED constraint must not
            >>>be defined as NOT DEFERRABLE, although an INITIALLY DEFERRED
            >>>constraint that doesn't specify either is considered DEFERRABLE.
            >>>The docs refered to are weak on this, care to try a rewrite of
            >>>those parts? :)[/color]
            >>
            >>Sure, after I know what the rules are!!!!![/color]
            >
            >
            > Basically, you can specify one of the following states on the constraint
            > (unless I'm missing something)
            >
            > Neither a check time nor a deferrability, in which case you get
            > NOT DEFERRABLE INITIALLY IMMEDIATE
            > No check time and NOT DEFERRABLE, in which case you get
            > NOT DEFERRABLE INITIALLY IMMEDIATE
            > No check time and DEFERRABLE, in which case you get
            > DEFERRABLE INITIALLY IMMEDIATE
            > A check time of INITIALLY IMMEDIATE and no deferrability, in which case
            > you get NOT DEFERRABLE INITIALLY IMMEDIATE
            > A check time of INITIALLY DEFERRED and no deferrability, in which case
            > you get DEFERRABLE INITIALLY DEFERRED
            > A check time of INITIALLY IMMEDIATE and NOT DEFERRABLE, in which case
            > you get NOT DEFERRABLE INITIALLY IMMEDIATE
            > A check time of INITIALLY IMMEDIATE and DEFERRABLE, in which case
            > you get DEFERRABLE INITIALLY IMMEDIATE
            > A check time of INITIALLY DEFERRED and DEFERRABLE, in which case
            > you get DEFERRABLE INITIALLY DEFERRED
            > A check time of INITIALLY DEFERRED and NOT DEFERRABLE is an error
            > condition.
            >
            >
            >
            > ---------------------------(end of broadcast)---------------------------
            > TIP 7: don't forget to increase your free space map settings
            >[/color]


            ---------------------------(end of broadcast)---------------------------
            TIP 1: subscribe and unsubscribe commands go to majordomo@postg resql.org

            Comment

            Working...