| From: | Simeó Reig <simeo(at)nil(dot)fut(dot)es> |
|---|---|
| To: | Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr> |
| Cc: | pgsql-odbc(at)postgresql(dot)org |
| Subject: | Re: Last inserted id |
| Date: | 2001-11-12 14:27:39 |
| Message-ID: | Pine.LNX.4.10.10111121424020.4974-100000@chico.machine.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-odbc |
On Mon, 12 Nov 2001, Jean-Michel POURE wrote:
> At 09:55 12/11/01 +0000, you wrote:
> >'Cos that's not safe either - you might get multiple rows inserted at the
> >same time - unlikely, but certainly possible.
>
> In most cases a simple timestamp is enough because you add some other
> parameter to you query (ex:company name, or whatever field you inserted).
> For example, if you insert values with First_name=Dave, Second_name=Page,
> Timestamp=current time and query the resulting row, there is *very little*
> chance to get rows from other users.
>
> I guess this is the recommended way (see Access howto).
Yes, but the query for search the row is more expensive than select from
an id that is normally indexed. I have making tests and 'option A' seems
be the best.
Thanks
Simeo Reig
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-11-12 15:29:52 | Re: Last inserted id |
| Previous Message | Lucas Grijander | 2001-11-12 14:12:42 | Lotus Wordpro |