[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] re: tricky
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] re: tricky |
Date: |
Sun, 29 May 2005 18:14:59 +0200 |
User-agent: |
Mutt/1.3.22.1i |
On Sun, May 29, 2005 at 10:46:45PM +1000, Syan Tan wrote:
> the constraints off is for insertion in no particular order, not for
> performance
Ah, I see. Good point. For that one might search the
PostgreSQL archives for "temporarily", "defer", "constraint".
> Attached is a plain old map making parser :
> the map is of the form
>
> table:
> id1:
> field : value, type
> field2: value2, type2
> id2:
> .....
>
> table2:
> .....
>
> I was think you can export the last part of the print output, the
> printed indented
> map , as a export file.
>
> The export file contains the original ids.
> Then you transfer the file,
> and a importer creates the new indexes against the
> second level id keys using the corresponding sequence for each table
Sure, that's another approach.
Is there any flaw with my original reasoning ?
insert into identity (...) values (...);
insert into names (
id_identity,
...
) values (
currval(identity_id_seq),
...
)
etc.
This would free the resulting SQL from PK/FK dupes, too, no ?
> An intermediate file format means you don't have to a connection to the
> instance of gnumed database you are trying to export to.
I don't think you would have to have one with my original
approach either. Or do you ? Your approach may have other
benefits which I fail to see yet, however.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
Re: [Gnumed-devel] re: tricky, Karsten Hilbert, 2005/05/30
Re: [Gnumed-devel] re: tricky, Syan Tan, 2005/05/30