Re: [HACKERS] Values of fields in Rules

2009-05-05 Thread mito
mito wrote: Hi, when i create rule(on insert) on view(select id, name from users), i will recieve values that were inserted in form of reference words new.id, new.name. if i insert into users (id, name) values (null, null); then new.id = null and new.name = null if i insert into users

[HACKERS] Values of fields in Rules

2009-05-05 Thread mito
Hi, when i create rule(on insert) on view(select id, name from users), i will recieve values that were inserted in form of reference words new.id, new.name. if i insert into users (id, name) values (null, null); then new.id = null and new.name = null if i insert into users (name) values (nul

[HACKERS] Reference on partial data

2009-04-19 Thread mito
Hi, is it possible to create reference constraint only on defined subset of data? Reference can be defined on column which has unique constraint. It is also possible to create partial unique index. So it should by possible to reference this column. But postgres can not see this constraint and

[HACKERS] Recursive plpgsql function in rule

2009-04-19 Thread mito
I am trying to select subtree by parent id in table: create table categories( id int, parent_id int ); I am fetching it by recursive plpgsql function, which works well. When i use that function as part of rule operation, i am getting ERROR: stack depth limit exceeded. I have

Re: [HACKERS] Postgres SQL specification (tests)

2009-04-16 Thread mito
By table structure i mean table definition options. Kevin Field wrote: On Apr 16, 3:14 am, mito wrote: Hi, i have built an SQL interface using rule system which supports row versioning and i would like to test it against Postgres SQL specification. Is there something like test cases for

[HACKERS] Postgres SQL specification (tests)

2009-04-16 Thread mito
Hi, i have built an SQL interface using rule system which supports row versioning and i would like to test it against Postgres SQL specification. Is there something like test cases for postgres SQL interface? Or do you have any ideas how to build a group of all possible cases of table struct

Re: [HACKERS] Affected rows count by rule as condtition

2009-04-13 Thread mito
then one. I am using rules as layer to save every version of row in shadow table, so i cant use unique constraint on column, because of many versions may have same value. Robert Haas wrote: On Mon, Apr 13, 2009 at 12:12 PM, mito wrote: Hi, is there any way how to count affected rows by on

Re: [HACKERS] Affected rows count by rule as condtition

2009-04-13 Thread mito
I am using rules as layer to save every version of row in shadow table, so i cant use unique constraint on column, because of many versions may have same value. mito Jaime Casanova wrote: On Mon, Apr 13, 2009 at 11:12 AM, mito wrote: It need to simulate unique constraint on field

[HACKERS] Affected rows count by rule as condtition

2009-04-13 Thread mito
Hi, is there any way how to count affected rows by on update rule and use it as part of condtions. Example: CREATE OR REPLACE RULE "_UPDATE" AS ON UPDATE TO "users" DO INSTEAD ( UPDATE "s_users" SET id = new.id, login = new.login, WHERE id IN (SELECT id FROM "s_users" ) AND

Re: [HACKERS] WAL files format

2008-04-20 Thread mito
PROTECTED]> wrote: See xlogdump and xlogviewer. On Sun, Apr 20, 2008 at 7:44 AM, mito <[EMAIL PROTECTED]> wrote: Hi, iam developing version control system based on content because i havent found anything for postgres and it sounds like great tool to have. Propabl

[HACKERS] WAL files format

2008-04-20 Thread mito
Hi, iam developing version control system based on content because i havent found anything for postgres and it sounds like great tool to have. Propably i will use Rules and Views with shadow tables, but iam interested in alternative to examine WAL files. So iam interested in WAL file format