Shawn Harrison wrote [01/28/05 3:53 PM]:
I have a table like this:
create table objects (
id serial primary key,
name varchar not null,
parent integer references objects(id) default 1 not null,
urivarchar not null
) without oids;
The uri column is a denormalization f
Shawn Harrison wrote [01/31/05 12:56 PM]:
Shawn Harrison wrote [01/28/05 3:53 PM]:
create or replace rule objects__update as on update to objects
do instead (
update objects_data set
name = new.name,
typename = new.typename,
parent = new.parent,
PFC wrote [01/28/05 7:08 PM]:
First you should use a ltree type for the uri field :
Yes, it would be very good if I could use ltree rather than rolling my
own, but ltree doesn't meet my use requirements.
- you write it foo.bar instead of /foo/bar
That is the problem: The point is to make look
Andrey V. Semyonov wrote [01/29/05 12:45 PM]:
isn't it possible to restrict UPDATE by access rights based on the DB's
user?
Create table with owner set to the administrator of the database (NOT
PostgreSQL SERVER!!!) and grant only the needed rights (or none of them)
to the user from which the u
isn't it possible to restrict UPDATE by access rights based on the DB's
user?
Create table with owner set to the administrator of the database (NOT
PostgreSQL SERVER!!!) and grant only the needed rights (or none of them)
to the user from which the usual processing of the database will be
perfo
First you should use a ltree type for the uri field :
- you write it foo.bar instead of /foo/bar
- there are operators on ltree types to express "is parent of", "is
children of"
- these operators are indexed
Check the readme :
http://www.sai.msu.su/~megera/postgres/gist/ltree/
If you h
I have a table like this:
create table objects (
id serial primary key,
namevarchar not null,
parent integer references objects(id) default 1 not null,
uri varchar not null
) without oids;
The uri column is a denormalization for performance, storing a "