Unix Technical Forum

Re: [NOVICE] Last ID Problem

This is a discussion on Re: [NOVICE] Last ID Problem within the pgsql Hackers forums, part of the PostgreSQL category; --> > Tom Lane <tgl@sss.pgh.pa.us> writes: > > > Greg Stark <gsstark@mit.edu> writes: > > > Tom Lane <tgl@sss.pgh.pa.us> writes: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:35 AM
Merlin Moncure
 
Posts: n/a
Default Re: [NOVICE] Last ID Problem

> Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> > Greg Stark <gsstark@mit.edu> writes:
> > > Tom Lane <tgl@sss.pgh.pa.us> writes:
> > >> How is what you're suggesting more portable?

> For postgres it looks like currently it requires you to pass in the

table
> and
> field might even need a "driver-specific hint" telling it the sequence
> name.


That is a shortcoming of the DBD:g driver which really should be
returning a key (comprised of columns, some or none of which may be
defaulted by the server). The 'database supplied' integer assumption is
bad, bad, bad. In fairness, getting the last returned key is a
catastrophic limitation of sql that we must all work around (itself
being a specific annoyance of that tricky devil, default columns). :-)

The only thing that is going to meet your requirements is a system wide
(well, at least table wide, but system wide would be better) 64 bit oid,
which doesn't exist right now. Sequences (or more generally, defaulted
columns) are application managed and difficult to deal with at the
driver level.

Merlin


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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com