Re: Design question regarding arrays

From: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>
To: "Oliver Fromme" <olli(at)lurza(dot)secnetix(dot)de>, "Michael Glaesemann" <grzm(at)myrealbox(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>, "A Gilmore" <agilmore(at)shaw(dot)ca>
Subject: Re: Design question regarding arrays
Date: 2004-08-09 10:14:37
Message-ID: 000201c47df9$bf2ca7c0$04653744@WATSON
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm a novice, too, but why not look up the value in the sequence and
increment it before doing any inserting? If you are doing all the inserts
at the same time (more or less), then you can just use this value in the
insert into both tables. Put all of this inside one transaction.

Sean
----- Original Message -----
From: "Oliver Fromme" <olli(at)lurza(dot)secnetix(dot)de>
To: "Michael Glaesemann" <grzm(at)myrealbox(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>; "A Gilmore" <agilmore(at)shaw(dot)ca>
Sent: Monday, August 09, 2004 6:06 AM
Subject: Re: [NOVICE] Design question regarding arrays

>
> Michael Glaesemann wrote:
> > On Aug 9, 2004, at 6:42 PM, Oliver Fromme wrote:
> >
> > > Well, I assume that all your book titles are unique,
> >
> > Realistically, probably not a good assumption. Not one I'd want to bank
> > by db schema on. You might be luckier with something like ISSN, but I
> > don't know enough about re-use of those types of numbers.
>
> My example was a bit simplified for the matter. Probably
> those rows contain more information than just the title,
> but also the author, publisher, date, ISSN/ISBN etc.
> I think it is a reasonable assumption that the whole rows
> (excluding the serial IDs) are unique.
>
> Best regards
> Oliver
>
> --
> Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
> Any opinions expressed in this message may be personal to the author
> and may not necessarily reflect the opinions of secnetix in any way.
>
> "I have stopped reading Stephen King novels.
> Now I just read C code instead."
> -- Richard A. O'Keefe
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Glaesemann 2004-08-09 10:16:29 Re: Design question regarding arrays
Previous Message Oliver Fromme 2004-08-09 10:06:12 Re: Design question regarding arrays