Re: RE : full featured alter table? - Mailing list pgsql-general

From weigelt@metux.de
Subject Re: RE : full featured alter table?
Date
Msg-id 20030616221522.GF14595@metux.de
Whole thread Raw
In response to Re: RE : full featured alter table?  (Tino Wildenhain <tino@wildenhain.de>)
Responses Re: RE : full featured alter table?  (Sven Köhler <skoehler@upb.de>)
List pgsql-general
On Mon, Jun 16, 2003 at 09:26:12PM +0200, Tino Wildenhain wrote:

<snip>
> I think there are quite more praxis relevant problems to solve :)
ACK.

I'd like to see some features, which can be good for distributed databases:

* user defined OID spaces for serveral classes (and their derived classes)
* automatic mtime field update (but only if data really changed)

At the moment i'm doing this in the application (some not-too-small
php code), but it would be nice if the RDBMS could do this, so this
functionality could be provided directly through an SQL interface.

For many applications i use an object-like table model: each table
is derived from _inode, which defines an (cluster wiede) unique inode_id
and an mtime field. The applications do not make direct queries, but
access the db over an abstraction layer instead. This layer has definitions
for each class (object type, properties, etc) and generates queries for
actions like create, update, query, get,... It also implements some
little caching. On create() the abstraction layer generates an query which
fetches the inode_id from an sequence (this sequence has to be adjusted
for each node in the cluster, so each node has its own inode_id space)
and sets the mtime to current_timestamp(). On update() it also updates
the mtime field. But also there's an raw-store mode, which does _not_
update the mtime field, but writes it as it comes from the user
(this is necessary for syncing to avoid loops, since the post-out
uses the mtime to find out which records to send to another node)

I've tried to achieve this w/ rules, but i couldnt handle this
(perhaps i'm too stupid ? ;-))

cu
--
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux ITS
 Webhosting ab 5 EUR/Monat.          UUCP, rawIP und vieles mehr.

 phone:     +49 36207 519931         www:       http://www.metux.de/
 fax:       +49 36207 519932         email:     contact@metux.de
 cellphone: +49 174 7066481         smsgate:   sms.weigelt@metux.de
---------------------------------------------------------------------
 Diese Mail wurde mit UUCP versandt.      http://www.metux.de/uucp/

pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: RE : full featured alter table?
Next
From: Ernest E Vogelsinger
Date:
Subject: Interesting incosistent query timing