Re: Writing values to relation using bytearray ...

From: Kedar Potdar <kedar(dot)potdar(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Writing values to relation using bytearray ...
Date: 2009-03-06 17:30:31
Message-ID: bd8134a40903060930u2907d91ftcb1b80859a48121e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks Tom for your interest.

I could find a workaround for the issue wherein the value of type
which is not stored "by value" and has fixed data length, is being
stored in string format to the relation.

While retrieving from relation, this value is converted by using
"coerce_to_specific_type()"
to its native type datum represation as required.

This is a bit of overhead and I'd like to find more efficient solution
and will look pg_statistics data store.

Regards,
-
Kedar

- sent from a mobile device.

On 3/6/09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Kedar Potdar <kedar(dot)potdar(at)gmail(dot)com> writes:
>> The problem here is I need to store values of different types into
>> bytearray
>> column of relation.
>
> Perhaps you should study the ANALYZE code. AFAICS your requirements are
> not different from those of the pg_statistic data store. You should do
> things the same way they are done there, if only to reduce the surprise
> factor for readers of the code.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-03-06 17:36:46 Re: Writing values to relation using bytearray ...
Previous Message Tom Lane 2009-03-06 17:20:12 Re: small parallel restore optimization