From: | Rajarshi Guha <rguha(at)indiana(dot)edu> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | PL/pgsql function handle CUBE values |
Date: | 2008-01-16 20:15:21 |
Message-ID: | F9DD3928-CDB6-4B32-9D32-E35EA6228AD1@indiana.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi, I am trying to write a PL/pgsql function that will take a CUBE
variable (which will be a 1D point) and a double precision variable.
If the input CUBE is defined as
'(x,y,z)'::cube
the function would then return a CUBE value of the form
'(x+R,y+R,z+R),(x-R,y-R,z-R)'::cube
where R is the second argument.
The problem I'm having is to actually add R to the individual
components of the CUBE variable. I can't cast CUBE to float[] and I
don't see anyway to get at the individual components of the CUBE.
Any pointers would be appreciated.
-------------------------------------------------------------------
Rajarshi Guha <rguha(at)indiana(dot)edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
"355/113 -- Not the famous irrational number PI,
but an incredible simulation!"
From | Date | Subject | |
---|---|---|---|
Next Message | Colin Wetherbee | 2008-01-16 20:41:14 | Re: PL/pgsql function handle CUBE values |
Previous Message | Webb Sprague | 2008-01-16 19:36:49 | SVN event hooks for PL/PGSQL functions and DDL? |