Re: regclass without error? - Mailing list pgsql-hackers

From David Fetter
Subject Re: regclass without error?
Date
Msg-id 20100903142100.GA1526@fetter.org
Whole thread Raw
In response to Re: regclass without error?  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Responses Re: regclass without error?
List pgsql-hackers
On Fri, Sep 03, 2010 at 05:10:44PM +0300, Marko Tiikkaja wrote:
> On 2010-09-03 4:46 PM, Tatsuo Ishii wrote:
> >>You can write a query against the system catalog tables.
> >
> >That was pretty hard than I though(schema search path etc.).
> >
> >>Or you could
> >>install a function that wraps the regclass cast in an exception
> >>handler.
> >
> >That requires users to install the function. Annoying for users.
> 
> How about using a SAVEPOINT before the cast?  Wouldn't fail your
> transaction..

For unattended operation, there are some issues:

* Generating appropriate SAVEPOINT names
* Keeping track of same
* Detecting errors
* Issuing ROLLBACKs to the aforementioned SAVEPOINT

None of this works super well for a bulk load.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: regclass without error?
Next
From: Tom Lane
Date:
Subject: Re: regclass without error?