Hoping - is there a "automagically" way to emulate the PK/FK, etc settings in PostgreSQL in the rela

Hoping - is there a "automagically" way to emulate the PK/FK, etc settings in PostgreSQL in the rela

am 29.11.2007 00:24:54 von Greg Cocks

SGVsbG8sDQoNCkhvcGluZyAtIGlzIHRoZXJlIGEgJ2F1dG9tYWdpY2FsbHkn
IHdheSB0byBlbXVsYXRlIHRoZSBQSy9GSywgZXRjIHNldHRpbmdzIGluIFBv
c3RncmVTUUwgaW4gdGhlIHJlbGF0aW9uc2hpcHMgaW4gQWNjZXNzPw0KDQpN
YXliZSBsb29rdXBzIHRvIGVtdWxhdGUgdGhhdCBidWlsdCBpbiBNUyBBY2Nl
c3MgbmF0aXZlbHkgdG8gZW11bGF0ZSB0aGUgRksgcmVsYXRpb25zaGlwcyBp
biB0aGUgUG9zdGdyZVNRTCBsaW5rZWQgdGFibGVzPw0KDQpKdXN0IHRob3Vn
aHQgSSB3b3VsZCBhc2shICAg4pi6DQoNCi0tLS0tLS0tLS0NClJlZ2FyZHMs
DQpHUkVHIENPQ0tTDQpHSVMgQW5hbHlzdCBWDQpnY29ja3MgfGF0fCBzdG9s
bGVyLmNvbQ0KUy4gTS4gU3RvbGxlciBDb3JwDQoxMDUgVGVjaG5vbG9neSBE
cml2ZSwgU3VpdGUgMTkwDQpCcm9vbWZpZWxkLCBDTyA4MDAyMQ0Kd3d3LnN0
b2xsZXIuY29tDQozMDMtNTQ2LTQzMDANCjMwMy00NDMtMTQwOCBmYXgNCjMw
My01NDYtNDQyMiBkaXJlY3QNCjMwMy04MjgtNzU3NsKgY2VsbA0KDQoKLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKGVuZCBvZiBicm9hZGNhc3QpLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tClRJUCA2OiBleHBsYWluIGFuYWx5
emUgaXMgeW91ciBmcmllbmQK

Re: Hoping - is there a "automagically" way to emulate thePK/FK, etc settings in PostgreSQL in the r

am 29.11.2007 00:30:58 von Joshua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VW0yQ1RjUFp2cXVySU9RQ2VNTGJqDQpCMFNNb1VNRkMv
SGRXNGRSbFVOU1oyND0NCj1LQXJxDQotLS0tLUVORCBQR1AgU0lHTkFUVVJF
LS0tLS0NCgotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0oZW5kIG9mIGJy
b2FkY2FzdCktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KVElQIDc6IFlv
dSBjYW4gaGVscCBzdXBwb3J0IHRoZSBQb3N0Z3JlU1FMIHByb2plY3QgYnkg
ZG9uYXRpbmcgYXQKCiAgICAgICAgICAgICAgICBodHRwOi8vd3d3LnBvc3Rn
cmVzcWwub3JnL2Fib3V0L2RvbmF0ZQo=

Re: Hoping - is there a "automagically" way to emulate thePK/FK, etc settings in PostgreSQL in the r

am 29.11.2007 01:43:39 von Andreas

Joshua D. Drake schrieb:
> On Wed, 28 Nov 2007 16:24:54 -0700
> "Greg Cocks" wrote:
>
>> Hoping - is there a 'automagically' way to emulate the PK/FK, etc
>> settings in PostgreSQL in the relationships in Access?
>>
>
> What do you mean automagically? I haven't used Access in about 7 years
> but I seem to recall that if you had the relationship built, access
> would pick it up via odbc (at least with other databases).
>
Maybe he refers to the graphical representation of relations between
tables within access MDBs.
Then the answer was no. There is no automatic way for all I know.

Access can mind fk-constraints only within one mdb file but one can
manually draw simple connections between linked in external tables
though those are just added sugar that will commodize query design a wee
bit.

AFAIK Access will use indexes within a postgresql db and is obviously
bound to fk-constraints within the backend, though it won't fetch those
constraints to use them for any magic like in the query builder.
The query builder would know of relations in an MDB and autoconnect
tables with such links as soon as they are dropped into the query graph.
Cute ... but well ... you know ;)


>> aybe lookups to emulate that built in MS Access natively to emulate
>> the FK relationships in the PostgreSQL linked tables?
>>
Like mentioned above you may draw those links yourself.
I wouldn't rule out that it might be possible to peek through odbc and
analyse the backend to recreate the simple links within Access by VBA.
Well, pgAdmin lists the table constraints so why shouldn't Access see
them (somehow), too?
This might prove to be "interesting" for a winter weekend without
anything decent in the telly ;)


Regards
Andreas




---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: Hoping - is there a "automagically" way to emulate the PK/FK, etc settings in PostgreSQL in the

am 29.11.2007 18:11:32 von Greg Cocks

|Joshua D. Drake schrieb:
|> On Wed, 28 Nov 2007 16:24:54 -0700
|> "Greg Cocks" wrote:

|>> Hoping - is there a 'automagically' way to emulate the PK/FK, etc
|>> settings in PostgreSQL in the relationships in Access?


|> What do you mean automagically? I haven't used Access in about 7
years
|> but I seem to recall that if you had the relationship built, access
|> would pick it up via odbc (at least with other databases).
|> =20
|Maybe he refers to the graphical representation of relations between=20
|tables within access MDBs.
|Then the answer was no. There is no automatic way for all I know.

Exactly, that is it... I reconstructed manually off my ERD from
PostgreSQL but always worried that I will miss something, etc

Don't get me wrong though, I love that someone/s (sic) has made these
drivers in the first instance, much appreciated...

|Access can mind fk-constraints only within one mdb file but one can=20
|manually draw simple connections between linked in external tables=20
|though those are just added sugar that will commodize query design a
wee=20
|bit.

And THAT is the main beauty, for me at least, of having the FK /
relationships emulated in the Access front end, in the GUI Query
Builder... whatever you say about Access, that IMHO is a sweet, sweet
feature...


|AFAIK Access will use indexes within a postgresql db and is obviously=20
|bound to fk-constraints within the backend, though it won't fetch those

|constraints to use them for any magic like in the query builder.
|The query builder would know of relations in an MDB and autoconnect=20
|tables with such links as soon as they are dropped into the query
graph.=20
|Cute ... but well ... you know ;)

In my experience, not huge, Access can get a little 'confused' when
running queries if there is a FK that is not emulated in the
relationship ERD (sic) in Access...

|>> Maybe lookups to emulate that built in MS Access natively to emulate
|>> the FK relationships in the PostgreSQL linked tables?
|>> =20
|Like mentioned above you may draw those links yourself.
|I wouldn't rule out that it might be possible to peek through odbc and=20
|analyse the backend to recreate the simple links within Access by VBA.=20
|Well, pgAdmin lists the table constraints so why shouldn't Access see=20
|them (somehow), too?
|This might prove to be "interesting" for a winter weekend without=20
|anything decent in the telly ;)

Yep, went through and drew them - but worried I missed some AND when I
change my design I need to remember to propagate those changes 'down the
line'... (interesting to see how Access handles those multiple links...)

Shall I come over and unplug your telly? You can miss East Enders one
weekend? GDR

Cheers:
GREG COCKS
Gcocks |at| stoller.com

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Hoping - is there a "automagically" way to emulate thePK/FK, etc settings in PostgreSQL in the r

am 29.11.2007 18:51:30 von Andreas

Greg Cocks schrieb:
> |Joshua D. Drake schrieb:
> |> On Wed, 28 Nov 2007 16:24:54 -0700
> |> "Greg Cocks" wrote:
>
> |>> Hoping - is there a 'automagically' way to emulate the PK/FK, etc
> |>> settings in PostgreSQL in the relationships in Access?
>
>
> In my experience, not huge, Access can get a little 'confused' when
> running queries if there is a FK that is not emulated in the
> relationship ERD (sic) in Access...
>
See ... the point is ... you are proposing development for an Access
feature that might use pgodbc but isn't odbc driver functionality at all.
So I may predict that the exitement in this discussion group here will
be somewhat limited.

> Yep, went through and drew them - but worried I missed some AND when I
> change my design I need to remember to propagate those changes 'down the
> line'... (interesting to see how Access handles those multiple links...)
>
It's really rather an Access topic.

Hint: At least Access 2000 keeps such simple links and even real fk
constraints in some cases even when the graph doesn't show them anymore.
It works nicely if you explicitely delete a constraint in the graph.
The irritation starts SOMETIMES when you drop or rename a connected
table or even just change a column name that is part of a constraint.
The next time you open the constraint-graph this constraint might have
disappeared, though you still get the integrity-errors as if the
constraint was still there.

Try to find a tool that migrates real DBs to Access. Well, usually it's
the other way round but maybe you are lucky.

> Shall I come over and unplug your telly? You can miss East Enders one
> weekend?
Never heared of "East Enders" but thanks anyway. ;)



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend