PL Problems.

From: Adriaan Joubert <a(dot)joubert(at)albourne(dot)com>
To: Postgres-General <pgsql-general(at)postgreSQL(dot)org>
Subject: PL Problems.
Date: 1999-06-03 15:07:30
Message-ID: 37569A32.FCB64D39@albourne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have my marvelous bit type working now, and now I find out I cannot
use it in PL scripts.

tt=> create table test (a int4, b bit2);
CREATE
tt=> CREATE FUNCTION mytrig () RETURNS opaque AS
'
tt-> '
tt'> DECLARE
tt'> def_state CONSTANT BIT2 := 'b0001'::BIT2;
tt'> BEGIN
tt'> new.b = def_state;
tt'> RETURN new;
tt'> END;
tt'> ' LANGUAGE 'plpgsql';
ERROR: parser: parse error at or near "b0001"
tt=>

I've tried all combinations I could think of, always with the same
result.

Is this a restriction in PL? I would have thought that the types are
simply looked up in the systems tables, or do I have to do something
else?

Any help greatly appreciated! Even if only to tell me that this doesn't
work in which case I can convert back to using integers.

Cheers,

Adriaan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adriaan Joubert 1999-06-03 15:19:47 Re: [GENERAL] PL Problems.
Previous Message Andre Bonhote 1999-06-03 14:48:03