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(
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
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
> >> +---
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
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
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
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
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
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
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
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
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
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:
>
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
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
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
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
>
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
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
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
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
>
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
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
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,
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
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
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:
>>
>>
27 matches
Mail list logo