Re: How to combine multiple field primary key and Row Versioning

From: DI Hasenöhrl <i(dot)hasenoehrl(at)aon(dot)at>
To: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: How to combine multiple field primary key and Row Versioning
Date: 2001-06-28 10:39:16
Message-ID: 003001c0ffbe$94d610e0$01011eac@irina
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello Stuart,

Thank you for your hint. I overloaded the = operator for xid,int4.
The problem is caused by multiple field primary key; it works with a single field primary key.
I got the hint to use a *dummy* single field primary key and use unique indices. I have to change all tables, if there is no other way to work with multiple field primary key and Row Versioning.

Did you already find a fast solution for combo boxes? Since now I was not lucky. I tried to use *OpenRecordset with( dbopendynamic ) * to get automatically changes made by an other user, but this didn't work the way I expected.
1. I can't see the changes made by an other user
2. my user defined function, which uses the dynamic recordset as rowsource, for the combo box is slower than rowsource type via linked table

My form becomes slow, because I use some combo boxes which depend on other combo boxes. I think, that speed would increase if I find a way to write pass through queries with parameters.

Kind regards
Irina

----- Original Message -----
From: Henshall, Stuart - WCP
To: 'DI Hasenöhrl' ; pgsql-odbc(at)postgresql(dot)org
Sent: Thursday, June 28, 2001 10:24 AM
Subject: RE: How to combine multiple field primary key and Row Versioning

Hello,
I suspect that it doesn't have the xid=int4 operator. Try adding the
following:

create function int4eq(xid,int4)
returns bool
as ''
language 'internal';

create operator = (
leftarg=xid,
rightarg=int4,
procedure=int4eq,
commutator='=',
negator='<>',
restrict=eqsel,
join=eqjoinsel
);

I'm assuming the server reported an error something like:
ERROR: Unable to identify an operator '=' for types 'xid' and 'int4'
You will have to retype this query using an explicit cast
Hope this helps,
- Stuart

> -----Original Message-----
> From: DI Hasenöhrl [SMTP:i(dot)hasenoehrl(at)aon(dot)at]
> Sent: Tuesday, June 26, 2001 11:37 AM
> To: pgsql-odbc(at)postgresql(dot)org
> Subject: How to combine multiple field primary key and Row Versioning
>
> Hello,
>
> I use Postgrsql 7.0.2 and ODBC 7.1.003. I discovered, that Row Versioning
> doesn't work with multiple field primary keys.
> I need Row Versioning to be able to change tuples of a table, inserted by
> a function and I use multiple field primary keys to be sure, that inserted
> data are correct ie table *sortiment* contains the articles of each year
>
> create table sortiment(
> year integer,
> article_nr integer,
> number integer,
> primary key(year,article_nr)
> );
>
>
> Are there further releases, which can combine multiple field primary keys
> and Row Versioning, or does anyone have any ideas, how to solve this
> confict?
>
> Thanks in advance for any hint
> Irina
>
> E-Mail: i(dot)hasenoehrl(at)aon(dot)at <mailto:i(dot)hasenoehrl(at)aon(dot)at>

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Rony Khoury 2001-06-29 08:33:34 connect but can not browse files
Previous Message Henshall, Stuart - WCP 2001-06-28 08:24:55 RE: How to combine multiple field primary key and Row Versioning