[HACKERS] text(bool) not defined

2001-10-09 Thread Dave Blasby
I've noticed that text(bool) isnt a defined function (nor does 'true'::bool::text work). It would be great to have this defined. Since "select 'false'::bool" gives 'f' and "select 'true'::bool" gives 't', perhaps text(bool) should return 't' or 'f'. A case can, also, be given for returning 'tr

[HACKERS] BUG: text(varchar) truncates at 31 bytes

2001-10-03 Thread Dave Blasby
#create table t (v varchar); #insert into t values ('0123456789a0123456789b0123456789c0123456789d'); #select v from t; v -- 0123456789a0123456789b0123456789c0123456789d (1 row) So far, so good. #select te

Re: [HACKERS] Bad behaviour when inserting unspecified variable length

2001-09-04 Thread Dave Blasby
> Uh, what did your CREATE TYPE command look like, exactly? This sounds > like you specified a default value for the datatype. Okay, here's two examples; CREATE TYPE WKB ( internallength = VARIABLE, input = WKB_in, output = WKB_out, storage= extended ); CREAT

[HACKERS] Bad behaviour when inserting unspecified variable length datatypes

2001-08-31 Thread Dave Blasby
It took me a while to figure out what was going on, but I think I've figured it out. Lets say you have your own variable length datatype called 'MY_DATATYPE'. CREATE TABLE test_table (myint integer, mydata MY_DATATYPE); INSERT INTO test_table VALUES (1); At this point, I'd expect there to be on

[HACKERS] Forcing GiST index to be used

2001-08-14 Thread Dave Blasby
I have a custom datatype (the PostGIS geometry type), which I have indexed using a GiST index. The problem is, its difficult to get PostgreSQL to actually use the GiST index. The only way I can get it to be used is by 'set enable_seqscan = off', which seems a bit cheezy. What am I missing? Do

Re: [HACKERS] PostGIS spatial extensions

2001-08-13 Thread Dave Blasby
Tom Lane wrote: > > Dave Blasby <[EMAIL PROTECTED]> writes: > > [snip] Vivid Solutions (cf. > > http://www.vividsolutions.com/jts/jtshome.htm) will be releasing it > > under the LGPL. > > [snip] > > This leaves the option for creating a semi-compli

Re: [HACKERS] PostGIS spatial extensions

2001-08-13 Thread Dave Blasby
I think it would be great for PostgreSQL to be an 'OpenGIS Simple Feature Specification for SQL' compliant database with robust spatial operators right-out-of-the-box. Currently, PostGIS implements most of the OpenGIS specification. The unimplemented portions are the important; spatial operator

[HACKERS] How to find the database name during run-time

2001-08-01 Thread Dave Blasby
I have a function (plpgsql) and would like it to have access to the name of the current database. Unfortunately, I dont know how to ask the question. I've look in the documentation, and I can get a list of possible databases from pg_database, but I dont know which one I'm currently in. dave --

[HACKERS] Accessing different databases in a cluster

2001-08-01 Thread Dave Blasby
Is it possible to access tables in one database from another database if they're in the same cluster? I dont seem to be able to do it; is there something I have to do or is it impossible? Ie. If I have two databases accessible from the same postmaster; one called db_one and the other called db_t

[HACKERS] GiST index on data types that require compression

2001-05-24 Thread Dave Blasby
I'm trying to get my geometric type to spatially index. I tried RTrees, but they dont like objects that are bigger than 8k. I'm now trying to get a GiST index to index based on the bounding box thats contained inside the geometry. So the index is on a GEOMETRY type, but the index is only acting

[HACKERS] Rtree; cannot create index on polygons with lots of points

2001-05-23 Thread Dave Blasby
I'm trying to form an rtree index on a custom datatype, and I've come across a problem. The problem also affects the standard geometric datatypes. Here's a simple example: > create table test_geom (poly polygon); > insert into test_geom values ( ''); (...) So far, so good, but when you try

Re: [HACKERS] Rtree on custom data types; type conversion stops index use.

2001-05-11 Thread Dave Blasby
I'm using 7.1.1, and your suggestion WORKED! Thanks for your prompt reply! Refractions Research will be releasing (open source) "postGIS" very soon (as soon as its in a releasable state). It will contain GIS data types (box3d, multi-point3d, multi-polyline3d, multi-complex-polygon3d) and GIS o

[HACKERS] Rtree on custom data types; type conversion stops index use.

2001-05-11 Thread Dave Blasby
I've create a few types, including BOX3D (a simple bounding volume) and AGG_POINTS3D (a list of points with a BOX3D bounding volume). I've managed to get an rtree index on both the BOX3D type and AGG_POINTS3D. The agg_points3d index cheats by using the bounding volume inside the AGG_POINTS3D typ