Thread:

From
tankgirl@worldonline.es
Date:
  Hello,

  I want to implement versions of a relation using production rules.

  I have found that the syntax for creating a version is:

  'CREATE [direction] VERSION Vname FROM Bname'

  where...

    -> direction can be both forward or backward deltas
    -> Vname is the name of the version (the new table with updated,
       added or deleted tuples)
    -> Bname is the name of the base relation (the table I already have)

  I have typed it, but it doesn't work, and there is no man entry for
'CREATE VERSION'

  I wonder if there is any way of implementing versions using POSTGRES
rules.

  Thankyou.

                         Stay Safe & Happy

                                   :* TankGirl




Re:

From
Jan Wieck
Date:
tankgirl@worldonline.es wrote:
>   Hello,
>
>   I want to implement versions of a relation using production rules.
>
>   I have found that the syntax for creating a version is:
>
>   'CREATE [direction] VERSION Vname FROM Bname'
>
>   where...
>
>     -> direction can be both forward or backward deltas
>     -> Vname is the name of the version (the new table with updated,
>        added or deleted tuples)
>     -> Bname is the name of the base relation (the table I already have)
>
>   I have typed it, but it doesn't work, and there is no man entry for
> 'CREATE VERSION'
>
>   I wonder if there is any way of implementing versions using POSTGRES
> rules.
>
>   Thankyou.

    Hmmm,  I  can't find that in the grammar at all. What version
    of Postgres are you using?

    IIRC  versioning  was  some  feature  addressed  in  the  old
    Berkeley  code  of  Postgres,  somehow related to timetravel.
    Timetravel is long gone.

    Maybe you  can  implement  what  you  want  to  have  with  a
    combination  of  triggers, putting some timestamps into extra
    columns of your tables, and build views on top of it?


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com