[thelist] Postgre and Cold Fusion

Ken Schaefer ken.schaefer at gmail.com
Wed Aug 11 21:17:27 CDT 2004


On Wed, 11 Aug 2004 08:23:54 -0400, Joshua Olson <joshua at waetech.com> wrote:
> 
> > -----Original Message-----
> > From: Jeff Howden
> > Sent: Wednesday, August 11, 2004 3:31 AM
> >
> > Well, curval() is one way.  Just because you can call it between
> > page loads
> > and get the same value doesn't mean it's not thread safe.
> > Rather, it means
> > that nothing has happened to the sequence you're requesting the current
> > value for so therefore it's still the same.
> 
> Actually, it does in the sense that I meant.  curval() is supposed to return
> the last sequence number generated within the current session.  If each page
> load initiated a new session then the call to curval would result in an
> error on the subsequent page.

I've got a couple of question here - sorry for hijacking your thread!

You say you use a trigger in SQL Server, even though you are using
something like an Identity column (I assume that sequeunce is similar
to identity). Why not use @@IDENTITY or Scope_Identity()?

When using TDS to communicate with SQL Server, OLEDB or SqlClient or
whatever upper layer you are using issues a reset which resets the
session (even though the connection is still open) when the object is
closed in your upper layers, which is why @@IDENTITY is "safe" even
though the physical connections are never closed, but returned to the
connection polol - doesn't whatever CF uses to connect to PostgreSQL
have something similar? (I assume it's ODBC or something)

Thanks

Cheers
Ken


More information about the thelist mailing list