[GENERAL] CONSTRAINT does not show when applying a EXCLUDE constraint

2010-12-27 Thread Rob Marjot
Dear list, To rule out any double combination of two identifiers, in any order, I applied the following constraint to a table: CREATE TABLE test(object_id INTEGER, subject_id INTEGER, CONSTRAINT

Re: [GENERAL] generic modelling of data models; enforcing constraints dynamically...

2009-09-24 Thread Rob Marjot
Thank you, Ben. Well, I'm afraid you got the basic idea... I intend to implement a hybrid between a fixed schema and an Entity-Attribute-Value scheme. The schema will be able to cover 90% of the data needs; in other cases (specific projects) additional fields (and/or tables/relations) will be neede

Re: [GENERAL] stored procedure: RETURNS record

2009-09-25 Thread Rob Marjot
Still no luck... To clarify a bit, take this example: CREATE OR REPLACE FUNCTION transpose() RETURNS record AS $BODY$ DECLARE output RECORD; BEGIN SELECT * INTO output FROM (VALUES(1,2)) as tbl(first,second); RETURN output; END;$BODY$ LANGUAGE 'plpgsql' STABLE COST 100; Now, I e

Re: [GENERAL] stored procedure: RETURNS record

2009-09-26 Thread Rob Marjot
.. All this needs to be implemented fully in the database back-end; client application will not know they are talking to VIEWS rather than tables... Thus: the hosted database must simulate to provide various tables, whereas these are in fact stored in a limited number of base tables. Thanks in ad

Re: [GENERAL] order of (escaped) characters in regex range

2011-12-13 Thread Rob Marjot
True, but still weird... And are you sure it does the same thing? 2011/12/13 Szymon Guz > > > On 13 December 2011 14:04, InterRob wrote: > >> Dear List, >> >> I found this interesting: >> >> SELECT regexp_matches('123-A' , E'(3[A-Z\- ])'); >> ERROR: invalid regular expression: invalid charact