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

From: Andre Lopes <lopes80andre(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(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 23:40:12
Message-ID: AANLkTikvkXPTtTTlR9UOVgmic0FeEjHtpxnYAsXTuX1I@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

The function will run in the php-cli, in a CronJob, it is not for use in a
PHP webpage. I think doesn't matter the extra time that takes to run.

Best Regards,

On Sun, Jul 4, 2010 at 4:11 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>wrote:

> 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 Ricardo Ramírez 2010-07-05 01:29:25 Re: How to know if an INSERT is done inside a function?
Previous Message Garry Saddington 2010-07-04 15:50:17 Re: Open Source Forum Software using PostgreSQL?