Skip site navigation (1) Skip section navigation (2)

Re: Varlena Type Creation

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Varlena Type Creation
Date: 2008-02-27 22:10:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Feb 26, 2008 at 06:19:48PM +0100, Dimitri Fontaine wrote:
> So... where do I start to create a varlena datatype which has to store the 3 
> following values: text prefix, char start, char end.
> It's not clear for me whether this is what I need to provide:
> typedef struct

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.

Not sure what the chars are for, but perhaps it would be easiest to
treat it as a single text object with the two leading characters
signifying something?

Have a nice day,
Martijn van Oosterhout   <kleptog(at)svana(dot)org>
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2008-02-27 22:42:18
Subject: Re: new warning message
Previous:From: Jeff DavisDate: 2008-02-27 22:03:11
Subject: new warning message

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group