Re: [GENERAL] Numeric type problems

2004-11-02 Thread Paul Tillotson
First, every type in postgres is user-defined, in the sense that its binary structure and the arithmetic and comparison operations you can perform on it are defined by a set of native C functions that are present in the database executable or loaded as shared libraries. Because of postgres's e

Re: [GENERAL] Numeric type problems

2004-11-02 Thread M.A. Oude Kotte
This is a very interesting option. My biggest concern is performance: the project will require tables with millions of tuples. How does the performance of such user created types compare to using native types? Or are they 'built' using the same structure? Thanks again! Marc Paul Tillotson wrote

Re: [GENERAL] Numeric type problems

2004-11-01 Thread Paul Tillotson
Use a numeric type if you need more precision. template1=# create domain BIGINT_UNSIGNED numeric(20,0) check (value >= 0 and value < '18446744073709551616'::numeric(20,0)); CREATE DOMAIN template1=# create table foobar (i BIGINT_UNSIGNED); CREATE TABLE template1=# insert into foobar (i) values (-1