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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Golub 2010-09-03 14:30:19 Re: regclass without error?
Previous Message Marko Tiikkaja 2010-09-03 14:10:44 Re: regclass without error?