Search Postgresql Archives

Re: declare column update expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 11, 2008 at 9:10 PM, Chris Velevitch
<chris.velevitch@xxxxxxxxx> wrote:
> On Fri, Sep 12, 2008 at 1:53 AM, Scott Marlowe <scott.marlowe@xxxxxxxxx> wrote:
>> Here's a simple example of last modified trigger using plpgsql from way back:
>>
>> -- FUNCTION --
>>
>> CREATE FUNCTION modtime () RETURNS opaque AS '
>>    BEGIN
>>        new.lm :=''now'';
>>        RETURN new;
>>    END;
>> ' LANGUAGE 'plpgsql';
>
> This does work in 7.4. It doesn't like 'opaque', whatever that is. It
> doesn't like language plpgsql. I'm using a shared hosted database, so
> I'm probably not allowed to createlang. And it complains about 'new'.

Do you have a superuser account?  Pretty sure you gotta have that to
create lang.  OTOH, plpgsql is a "safe" language once installed, so
you should be able to ask your hosting provider to install it.  Can't
hurt to ask.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux