Re: declare column update expression

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Chris Velevitch" <chris(dot)velevitch(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: declare column update expression
Date: 2008-09-12 03:32:35
Message-ID: dcc563d10809112032q1938f7a6y84f7bf5fa9a30f83@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 11, 2008 at 9:10 PM, Chris Velevitch
<chris(dot)velevitch(at)gmail(dot)com> wrote:
> On Fri, Sep 12, 2008 at 1:53 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-09-12 03:34:18 Re: declare column update expression
Previous Message Jignesh K. Shah 2008-09-12 03:30:39 Re: PostgreSQL TPC-H test result?