Re: [HACKERS] Aggregates with context - a question

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Aggregates with context - a question
Date: 1999-06-10 07:35:09
Message-ID: 3.0.5.32.19990610173509.00970100@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have attached the latest attempt at my stats functions. They are defined for int4, float4 and float8, and now use a 'text' type to store context information. This gets rid of the need to pass pointers as int4, but brings me to the next question:

is it OK to store 'binary' data (possibly containing \0) in a text field, so long as that field is never displayed?

If it is, then I presume text fields are the best approach to preserving context in complex aggregate functions. Is this reasonable?

Any further (polite) suggestions would be welcome.

If all is OK, my final question is: would people be happy to incorporate such code into PG for general use once all relevant types are supported?

Attachment Content-Type Size
stats.tgz application/octet-stream 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pedro J. Lobo 1999-06-10 07:47:27 Postgres dies in the rules regression test (64-bit problem)
Previous Message Peter Garner 1999-06-10 06:45:50 transaction rollbacks on error