Re: [GENERAL] PL Problems. - Mailing list pgsql-general

From Adriaan Joubert
Subject Re: [GENERAL] PL Problems.
Date
Msg-id 37569D13.CDE6321C@albourne.com
Whole thread Raw
In response to Parser or documentation bug?  (Adriaan Joubert <a.joubert@albourne.com>)
List pgsql-general
> 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=>
>

Aaaah, Stupidity! I need double quotes around the strings, i.e.
''b0001''....

Sorry for the bandwith.

BTW, is their interest in having a 2 byte bit type as a contributed type
along the lines of int8? I could package it up, and post it. It supports
all the binary operations, i.e. & | ^ ~ << and >>. Only problem I would
like to resolve is why I cannot define the or operator as |.

Adriaan

pgsql-general by date:

Previous
From: Adriaan Joubert
Date:
Subject: PL Problems.
Next
From: "Kapoor, Nishikant X"
Date:
Subject: RE: [GENERAL] RE: [PORTS] AIX-4.2.1 binaries ? more info. PLEASE !