[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 'true'

[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

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 ); CREATE

[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

[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-compliant OpenGIS core inside PostgreSQL and having a LGPL add

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

[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] 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

[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 ( 'LOTS OF POINTS'); (...) So far, so good, but

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