Skip site navigation (1) Skip section navigation (2)

Re: regclass without error?

From: David Fetter <david(at)fetter(dot)org>
To: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, robertmhaas(at)gmail(dot)com,pgsql-hackers(at)postgresql(dot)org
Subject: Re: regclass without error?
Date: 2010-09-03 14:21:00
Message-ID: 20100903142100.GA1526@fetter.org (view raw or flat)
Thread:
Lists: 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(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Pavel GolubDate: 2010-09-03 14:30:19
Subject: Re: regclass without error?
Previous:From: Marko TiikkajaDate: 2010-09-03 14:10:44
Subject: Re: regclass without error?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group