From: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Subject: | Re: Varlena Type Creation |
Date: | 2008-02-28 09:45:21 |
Message-ID: | 200802281045.24156.dfontaine@hi-media.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Le mercredi 27 février 2008, Martijn van Oosterhout a écrit :
> I see no-one responded to this: a varlena has no fixed header size, so
> you can't fit it in a structure anyway. Once you're passed a pointer
> you use the LEN/PTR macros to extract what you want.
Once the type exists and the code gets some varlena kind type of objects to
play with, I think I'll use the same macros as for text usage... My problem
is more how to define a new "composite varlena", that is a new varlena type
composed of several base type...
I'm not sure I'm using a good vocabulary, please forgive me if it's all
unclear...
> Not sure what the chars are for
Maybe the input syntax would help getting what the chars are for.
To say a prefix range begins with '012' and any entry between '3' and '6',
you'd write e.g. '012[3-6]'::prefix_range. The chars are respectively '3'
and '6' and the greatest prefix of the prefix range is '012' here.
Here, '012[3-6]' @> '01234' is true but '012[3-6]' @> '0122' is false.
> , but perhaps it would be easiest to
> treat it as a single text object with the two leading characters
> signifying something?
I like your idea of using a single text datum for this and "encode" into it
the information I need: it makes it all simple for me to start working. But
still does not answer the question... not that the answer is needed any
more...
Thanks,
--
dim
From | Date | Subject | |
---|---|---|---|
Next Message | ITAGAKI Takahiro | 2008-02-28 09:55:07 | Re: CREATE TABLE, load and freezing |
Previous Message | Florian G. Pflug | 2008-02-28 09:35:38 | Re: CREATE TABLE, load and freezing |