Re: [GENERAL] PL Problems.
| От | Adriaan Joubert |
|---|---|
| Тема | Re: [GENERAL] PL Problems. |
| Дата | |
| Msg-id | 37569D13.CDE6321C@albourne.com обсуждение исходный текст |
| Ответ на | Parser or documentation bug? (Adriaan Joubert <a.joubert@albourne.com>) |
| Список | 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 по дате отправления: