pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Wish List: Client access to NUMERIC/DECIMAL type functions
4+ messages / 3 participants
[nested] [flat]

* Wish List: Client access to NUMERIC/DECIMAL type functions
@ 2002-07-12 13:23  Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>
  0 siblings, 1 reply; 4+ messages in thread

From: Warren W. Gay VE3WWG @ 2002-07-12 13:23 UTC (permalink / raw)
  To: pgsql-interfaces

It would be nice to see client side access to the decimal
routines used by PostgreSQL to support the decimal/numeric
data types. Are there any plans for that to happen?

Thanks, Warren.

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Wish List: Client access to NUMERIC/DECIMAL type functions
@ 2002-07-12 13:38  Jan Wieck <JanWieck@Yahoo.com>
  parent: Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>
  0 siblings, 1 reply; 4+ messages in thread

From: Jan Wieck @ 2002-07-12 13:38 UTC (permalink / raw)
  To: Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>; +Cc: pgsql-interfaces

"Warren W. Gay VE3WWG" wrote:
> 
> It would be nice to see client side access to the decimal
> routines used by PostgreSQL to support the decimal/numeric
> data types. Are there any plans for that to happen?

If you mean to make the arbitrary precision arithmetic available inside
of the libpq, no there are no such plans.

The functions, which you can find in src/backend/utils/adt/numeric.c,
are designed and optimized to live inside of the PostgreSQL database
backend. There are several other arbitrary precision packages out in the
world, that fit alot better into client applications. 


Jan

-- 

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Wish List: Client access to NUMERIC/DECIMAL type functions
@ 2002-07-12 13:55  Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>
  parent: Jan Wieck <JanWieck@Yahoo.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Warren W. Gay VE3WWG @ 2002-07-12 13:55 UTC (permalink / raw)
  To: Jan Wieck <JanWieck@Yahoo.com>; +Cc: pgsql-interfaces

Jan Wieck wrote:

>"Warren W. Gay VE3WWG" wrote:
>
>>It would be nice to see client side access to the decimal
>>routines used by PostgreSQL to support the decimal/numeric
>>data types. Are there any plans for that to happen?
>>
>
>If you mean to make the arbitrary precision arithmetic available inside
>of the libpq, no there are no such plans.
>
Yes.

>The functions, which you can find in src/backend/utils/adt/numeric.c,
>are designed and optimized to live inside of the PostgreSQL database
>backend. There are several other arbitrary precision packages out in the
>world, that fit alot better into client applications. 
>
I understand the "optimized" position.  But the rest does not make sense 
to me.

If I use the binary interface, I now have to convert your "decimal" number
to someone else's format, so I can do something with it.  

Oracle or INFORMIX OTOH, provide the user access to
routines to manipulate their builtin data types.  This is what
I would hope that PostgreSQL's client interface would work
towards.  It would certainly make it a lot more "client friendly".

As far as other "decimal" packages in the Open Source wild, I don't know 
of any,
but I'll admit that I've not looked too hard yet.
The GNU GMP is a multi-precision INTEGER or fraction library, but doesn't
support what is needed.  If you know differently, I welcome links. But I 
still
maintain that it makes the most sense, to have PostgreSQL native support
for their special builtin types.

-- 
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Wish List: Client access to NUMERIC/DECIMAL type functions
@ 2002-07-12 15:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2002-07-12 15:26 UTC (permalink / raw)
  To: Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>; +Cc: Jan Wieck <JanWieck@Yahoo.com>; pgsql-interfaces

"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:
> If I use the binary interface, I now have to convert your "decimal" number
> to someone else's format, so I can do something with it.  
> Oracle or INFORMIX OTOH, provide the user access to
> routines to manipulate their builtin data types.

We don't encourage people to use the binary interface at all, because we
don't want to get involved with handling cross-platform representational
differences (not to mention version-to-version changes in internal
representation).  Therefore there's no reason to export routines that
would handle the server-internal binary representatin.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2002-07-12 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-12 13:23 Wish List: Client access to NUMERIC/DECIMAL type functions Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>
2002-07-12 13:38 ` Jan Wieck <JanWieck@Yahoo.com>
2002-07-12 13:55   ` Warren W. Gay VE3WWG <ve3wwg@cogeco.ca>
2002-07-12 15:26     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox