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

Re: [HACKERS] varchar() vs char16 performance

From: Zeugswetter Andreas <andreas(dot)zeugswetter(at)telecom(dot)at>
To: "'Thomas G(dot) Lockhart'" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: "'pgsql-hackers(at)hub(dot)org'" <pgsql-hackers(at)hub(dot)org>
Subject: Re: [HACKERS] varchar() vs char16 performance
Date: 1998-03-19 18:04:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
>> I had thought that char2-16 add _no_ functionality over the char() and
>> varchar() types; Tatsuo points out at least one capability which they
>> have. Are there any others?
>> They give and take a char * pointer to a C function like
>> create function upper(char16)
>> returning char16 as '/u/my/' language 'sql';
>> whereas char() gives a varlena pointer.

>I don't really see this as a big deal since, for example, only 16 bytes
>are allocated for a char16, so it is not guaranteed to be zero delimited
>and you have to make a working copy to use libc functions anyway. Also,
>that is really an implementation detail or annoyance rather than a
>user-visible feature.

I thought almost all postgresql users write their C extensions ;-) 
it is ***the*** feature of postgresql. I am not saying that this is a real problem.
It is just one thing that will be different, but ok for me :-)

>With the macros that are provided for the varlena structure
>manipulations, things are pretty convenient. Are there more macros which
>could be helpful here??

pgsql-hackers by date

Next:From: Maurice GittensDate: 1998-03-19 18:50:24
Subject: Re: [HACKERS] Re: [QUESTIONS] Inheriting Triggers
Previous:From: Darren KingDate: 1998-03-19 17:29:18
Subject: Re: AW: [HACKERS] varchar() vs char16 performance

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