Re: [GENERAL] [ADMIN] Postgre 8.0 for Linux i586

2005-05-04 Thread Dale Sykora
Devrim GUNDUZ wrote: rpmbuild --rebuild --target i686 ...src.rpm will work. src rpm link below ftp://ftp.us.postgresql.org/pub/mirrors/postgresql/binary/v8.0.2/linux/srpms/fedora/fedora-core-3/postgresql-8.0.2-1PGDG.src.rpm ---(end of broadcast)--- TI

Re: [GENERAL] sub query constraint

2005-03-29 Thread Dale Sykora
Yudie Pg wrote: CREATE OR REPLACE FUNCTION validate_actions_insert() RETRUNS OPAQUE AS ' CREATE OR REPLACE FUNCTION validate_actions_insert() RETURNS OPAQUE AS $$ DECLARE rs RECORD; BEGIN SELECT INTO rs * FROM user_data WHERE name = NEW.user and write_access = 't'; IF NOT FOUND THEN RA

Re: [GENERAL] sub query constraint

2005-03-29 Thread Dale Sykora
Yudie Pg wrote: One way to do this is to add a write_access column to actions and use a constraint to force it to be true. Create a UNIQUE key of (name, write_access) for user_data and then add a FOREIGN KEY reference from (name, write_access) in actions to (name, write_access) in user_data. Yes

[GENERAL] sub query constraint

2005-03-28 Thread Dale Sykora
I am trying to develop a database table column that is contrainted to a subset of another table column. I have tried using foreign key, check, and inheritance, but I cannot figure out how to do it. I have a user_data table that has various user columns including name and the bool column writ

[GENERAL] foreign key help

2005-03-16 Thread Dale Sykora
I am building a database that has about 20 fields in various tables that I would like to constrain to a small group (<=5) of choices. Rather that refer to 20 seperate tables, I would like to refer to 1 table that contained category and choice fields. for example choices table category | choic

[GENERAL] text field constraint advice

2005-01-25 Thread Dale Sykora
PostgreSQL users, I would like to use a text field in a table and limit the size to reduce the chance of denial-of-service/buffer overflow/etc. I assume I can define table fields similar to the following "field_name text check (len(field) < 160)" although my syntax is probably wrong. Is check