Re: How to know if an INSERT is done inside a function?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Andre Lopes <lopes80andre(at)gmail(dot)com>, postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to know if an INSERT is done inside a function?
Date: 2010-07-04 15:11:39
Message-ID: AANLkTimDqlgysUdEbm5aEUmEZXyRCX0BQ6D0A89IyRwF@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/7/4 Merlin Moncure <mmoncure(at)gmail(dot)com>:
> On Sun, Jul 4, 2010 at 7:25 AM, Andre Lopes <lopes80andre(at)gmail(dot)com> wrote:
>> Great! That [begin exception end] is what I need!
>>
>> Thank you Pavel.
>>
>> Best Regards,
>
> Just a quick heads up: functions with exception handlers tend to be
> more expensive than those without, even if the exception doesn't fire.

yes, better to use prepared statement and read diagnostics info from PHP

Pavel

>
> merlin
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2010-07-04 15:50:02 Re: Open Source Forum Software using PostgreSQL?
Previous Message Thom Brown 2010-07-04 15:04:48 Re: Open Source Forum Software using PostgreSQL?