Re: VARIANT / ANYTYPE datatype

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: VARIANT / ANYTYPE datatype
Дата
Msg-id BANLkTi=4Cpt1SVFBv75eO=4zxpiLNL8BSA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: VARIANT / ANYTYPE datatype  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Wed, May 4, 2011 at 2:55 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> On 05/04/2011 01:36 PM, Tom Lane wrote:
>>
>>> The main idea is to be able to store column values in an audit table
>>> like this:
>>> old_value       variant
>>> new_value       variant
>>> Currently, they use text for old_value and new_value, but this is, of
>>> course, not very satisfactory.
>>
>> Just out of curiosity, what actual functionality gain would ensue over
>> just using text?  It seems like doing anything useful with the audit
>> table contents would still require casting the column to text, or the
>> moral equivalent of that.
>>
>
> Yeah, I've been down this road once or twice, and I think that's the $64
> question.
>
> I wrote a custom audit app two or three years ago. After several iterations
> the customer and I found that using an hstore for the old/new (or old record
> / changeset, which is what we actually use) was the most suitable for our
> use.

yeah -- +1 on that method.  I think it's really the right way to go
with the recent hstore enhancements.

merlin


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: GSoC 2011: Fast GiST index build
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: adding a new column in IDENTIFY_SYSTEM