[GENERAL] CONSTRAINT does not show when applying a EXCLUDE constraint -- and what about Enterprise Architect?

2010-12-27 Thread InterRob
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 "EXCL_double_combi" EXCLUDE USING btree (imm_LEAST(subject_id, object_id) WITH =, imm_GREATEST(

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

2010-12-27 Thread InterRob
Sorry: that is because the major part of my E-mail got chopped off... Herewith I am resending it: --- 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( o

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

2010-12-28 Thread InterRob
Lane > Richard Broersma writes: > > On Mon, Dec 27, 2010 at 12:50 PM, InterRob wrote: > >> pgsql Command "\d test" produces the following: > >>Table "public.test" > >>Column | Type | Modifiers > >> +---

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

2010-12-28 Thread InterRob
SOLVED: I should use the "CREATE UNIQUE INDEX ... ON ..." command, on an existing table. This cannot be done inline within the CREATE TABLE command. Thanks all, for your help. Rob 2010/12/28 InterRob > Dear Tom, > > Thanks for your hints; it is indeed funny (as mentione

Re: [GENERAL] Problem with multiple action rule on modifiable view

2011-04-06 Thread InterRob
Just a few days ago, I ran into the same thing. As I understand it: the idea behind the whole RULE system is that rules become added / replaced in the query tree BEFORE it is submitted to the optimizer. So, there is no quarantee queryies will be executed in the exact form and order as you wrote th

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

2009-09-24 Thread InterRob
Dear List, I am trying to implement the following: In a database I wish to implement a GENERIC datamodel, thus on a meta-level. All RELATIONS (part of a MODEL) will be a view on some base (being a table) JOINed with (an) extra column(s). Thus, this view consists of a number of FIELDS. I whish to m

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

2009-09-24 Thread InterRob
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] generic modelling of data models; enforcing constraints dynamically...

2009-09-24 Thread InterRob
Sam, Thanks for thinking along. The thing is that a SINGLE constraint might apply to MULTIPLE fields; therefore it seems best to build a set of key/value pairs... Multiple doesComply()s won't do the job :( BY THE WAY: I came to think of another option: putting additional columns (that is: addittio

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

2009-09-24 Thread InterRob
g is: altering table structures (changes should be limited to adding columns) is required on a ad hoc basis and End User should be able to do so... I guess that requires some over engineering... ? Rob 2009/9/24 Sam Mason > On Thu, Sep 24, 2009 at 10:33:37PM +0200, InterRob wrote: > > I ca

[GENERAL] stored procedure: RETURNS record

2009-09-25 Thread InterRob
Dear list, I am trying to find out whether I can use the "record" type as a polymorphic return type to return multiple columns, to be determined at runtime. In fact, I'm trying to write a function that provides a generic implementation of some deserialization of a certain field. The prototype of t

[GENERAL] FUNCTION taking a record; returning a record?

2009-09-25 Thread InterRob
Dear list, I wrote a function that takes one parameter of a certain 'table type': CREATE FUNCTION deserialize(serTable table1) RETURNS record AS ... I whish to use this function in a query such as: SELECT deser.* FROM deserialize(table1) deser(col1 integer, col2 integer), table1 WHERE table1.fie

Re: [GENERAL] stored procedure: RETURNS record

2009-09-26 Thread InterRob
Thank you for your response; I understand the information provided was somewhat limited; I am happy to provide a bit more though: I notice you guys have quite experience modeling data... What I am trying to do is: building views on a base table, extended by one or more columns, extracted (hence the

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

2009-09-27 Thread InterRob
n 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 advance, you guys out there! Rob 2009/9/26 David Fetter > On Thu, Sep 24, 2009 at 06:28:28PM +0200, InterRob wrote: >

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

2009-09-27 Thread InterRob
databases :(( Rob 2009/9/26 Erik Jones > > On Sep 24, 2009, at 2:07 PM, InterRob wrote: > > I guess it IS quite overengineered indeed... >> >> What I'm trying to do is to facilitate different fieldwork methodologies >> for archaeological research (on proj

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

2009-09-27 Thread InterRob
rd to your reply. (And with respect to your previous message: whom are you actually referring to by the acronym "OPs"?) Cheerz, Rob 2009/9/27 Peter Hunsberger > On Sun, Sep 27, 2009 at 2:22 PM, David Fetter wrote: > > On Sun, Sep 27, 2009 at 08:26:27PM +0200, InterRob wro

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

2009-09-27 Thread InterRob
09, at 21:10, InterRob wrote: > > Peter, may I invite you to privately share some more details on the system > you are using and the design of it? Did you implement it using PostgreSQL? > Looking forward to your reply. > (And with respect to your previous message: whom are you actua

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

2009-09-28 Thread InterRob
atabase scheme ? > > Oleg > > On Sun, 27 Sep 2009, InterRob wrote: > > Dear David, dear Peter, dear all, >> Peter, I was happy reading your reply right after I opened and read >> Davids. >> I do think I am on the right track; it is not a matter of building the >

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

2009-09-28 Thread InterRob
Second glance: brilliant again! Even support for indexing is available; nice job. I found the hstore.sql -- that will add type, functions and stuff to my db. I will give it a serious try! Rob 2009/9/28 InterRob > At first glance: brilliant! I was about to implement this key/value th

[GENERAL] WITH SELECT * FROM function() WHERE etc

2009-09-29 Thread InterRob
Dear list, Say, I wish to have a function returning a record, taking a row as parameter. However, from a performance perspective, I wish to be able to perform this query only on a subset by using a WHERE-clause. I can only think of the following approach: WITH ss AS ( SELECT * FROM my_table) SELE

[GENERAL] Autovacuum tables missing?

2009-09-29 Thread InterRob
Dear List, Possibly this has been posted on this list already before, but I got the following error when opening the properties dialog in pgAdmin III: ERROR: relation "pg_autovacuum" does not exist LINE 1: SELECT * FROM pg_autovacuum WHERE vacrelid=17241::oid This is a freshly installed PostgreSQ

Re: [GENERAL] [postgis-users] pgsql2shp : Encoding headache

2009-10-16 Thread InterRob
Does that last query (invoking the upper() function) actually run well when executed in pgsql console? Rob 2009/10/16 Arnaud Lesauvage > Hi all! > > I have an UTF8 encoded shapefile, and an UTF8 encoded postgis-enabled > database. I want my shapefile to be encoded in WIN1252, and a particular >

Re: [postgis-users] [GENERAL] pgsql2shp : Encoding headache

2009-10-16 Thread InterRob
I would do this last query searching for the 0xC29F character WITHOUT the upper() function on the source table, in the native (to table) UTF8 client encoding. No result either? Rob 2009/10/16 Arnaud Lesauvage > Arnaud Lesauvage a écrit : > >> But then, if I dump it through a query to have my fi

[GENERAL] UNIQUE constraint on character sequences

2011-05-14 Thread InterRob
Dear list, I would be pleased if you could share some thoughts with me on the following: say I wish to maintain a table with all distinct character sequences (variable length) showing series with strong similarities. Example: "abbbabacccdef" "abbbabaccdcdf" "abbbabaccdcgf" ... "qwtrhdffdd" ... "qw

Re: [GENERAL] UNIQUE constraint on KEY VALUE PAIRS

2011-05-14 Thread InterRob
BTREE( hash_sstore(the_key), the_key ) Does this make sense? I am seeking some sensible trade-off between performance and flexibility... Regards, Rob 2011/5/14 David Johnston > Could you index the reverse of the string so the unique part appears first? > > On May 14, 2011, at 11:20,

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

2011-12-13 Thread InterRob
Dear List, I found this interesting: SELECT regexp_matches('123-A' , E'(3[A-Z\- ])'); ERROR: invalid regular expression: invalid character range whereas: SELECT regexp_matches('123-A' , E'(3[\- A-Z])'); regexp_matches {3-} (1 row) Notice the order of (escaped) characters and

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

2011-12-13 Thread InterRob
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

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

2011-12-13 Thread InterRob
match these as well :)) Thanks! 2011/12/13 David Johnston > On Dec 13, 2011, at 8:09, Szymon Guz wrote: > > > > On 13 December 2011 14:04, InterRob < > rob.mar...@gmail.com> wrote: > >> Dear List, >> >> I found this interesting: >> >>