Re: [GENERAL] Not Geography

2008-04-15 Thread Obe, Regina
I have Postgresql database that I would like to link to the geometry side of Postgis. (This has little comparison to geography) Does anyone know of a tool or documentation that could get me started?? Bob Bob, I don't quite understand your question. Are you not sure how to install PostGIS, how

Re: [GENERAL] Not Geography

2008-04-15 Thread Obe, Regina
From: Bob Pawley [mailto:[EMAIL PROTECTED] Sent: Tue 4/15/2008 1:54 PM To: Obe, Regina; PostgreSQL Subject: Re: [GENERAL] Not Geography I have PostgreSQL, c/w the geometry attachment, installed on Win XP. I need to get started using it. I am best able to do that by example, however

[GENERAL] Operator COMMUTATOR - how does postgresql use this information

2008-04-11 Thread Obe, Regina
Does PostgreSQL use the COMMUTATOR property of an operator to determine if flip-flopped arguments can be collapsed. I used to think it did until someone pointed it doesn't - For example in the below SELECT b.* FROM boszip b INNER JOIN landparcels l ON (b.the_geom l.the_geom AND l.the_geom

[GENERAL] HOW does 8.3 CREATE REPLACe .. FUNCTION ..COST work

2008-02-25 Thread Obe, Regina
I think I am missing something about how the new CREATE OR REPLACE FUNCTION ...COST works or I am missing some setting in postgresql conf. I was hoping I could use it to control the function that is used in cases where only one needs to be evaluated. Regardless of what I do it seems to always

Re: [GENERAL] HOW does 8.3 CREATE REPLACe .. FUNCTION ..COST work

2008-02-25 Thread Obe, Regina
--Test 2: This works as I would expect - shows that none of the functions are run presumably its going straight for 5 2 --becuase it recognizes its the cheapest route TRUNCATE TABLE log_call; SELECT foo.value FROM (SELECT (fn_pg_costlyfunction() 2 OR fn_pg_cheapfunction() 2 OR 5

Re: [GENERAL] pg_ctl start fails on Windows

2007-12-24 Thread Obe, Regina
Could still be a permission problem. Whatever NT account you are using as the service account (usally called postgres) for the PostgreSQL server is the one that needs to be able to create the postmaster.pid. Make sure that account has full rights to the data folder. Hope that helps, Regina

Re: [GENERAL] How can I insert NULL into column with the type of timestamp?

2007-12-12 Thread Obe, Regina
Actually what you are doing below is trying to stuff '' in a timestamp field. Keep in mind '' and NULL are not the same. '' is invalid for timestamp where as NULL is fine. Your example should be insert into T_Admin(name,key,regDate,isLock,realName) values('aaa','aaa',NULL,'1','aaa'); I

Re: [GENERAL] Hijack!

2007-12-11 Thread Obe, Regina
Well said Greg. I have the same problem too of having a crippled mail reader :) Really I find mid posting hard to follow especially if I'm the one that posted the question. I hope we aren't going to hit people with hammers over this minor infraction. It really makes one feel unwelcome. I

Re: [GENERAL] Simpler dump?

2007-12-10 Thread Obe, Regina
I think PgAdmin ,in 1.8 at least, is by default set to hide system objects like the template databases. To enable this go to File-Options-Display and make sure to check the Show system objects in treeview. You may want to check some of the other options as well. Hope that helps, Regina

Re: [GENERAL] Script to reset all sequence values in the a given DB?

2007-12-10 Thread Obe, Regina
Did you want to set to a specific known value or the min value of the sequence. I think Pavel's sets to the min value of the sequence. The below sets all the sequences to the same value CREATE AGGREGATE sum ( BASETYPE = text, SFUNC = textcat,

Re: [GENERAL] simple update on boolean

2007-12-06 Thread Obe, Regina
You could use a COALESCE instead of a case statement for simple case like this. The below will treat a NULL as false and then when you do not it becomes true. So NULLS will be set to true UPDATE boolean_column SET boolean_column = NOT COALESCE(boolean_column, false) hope that helps, Regina

Re: [GENERAL] stored procedures and dynamic queries

2007-12-04 Thread Obe, Regina
As a side note, there is actually a book on design patterns in SQL, although I personally haven't read it. From the reviews I recall reading about it, I think its mostly based on Oracle Features. Still might be a good read as far as PostgreSQL is concerned except for the sections on Graphs and

Re: [GENERAL] [NOVICE] How to split a table?

2006-10-17 Thread Obe, Regina
I would do select * into mynewtable frommyoldtableORDER by random() LIMIT 15000 where 15000 in this case is your table row count*.6 If you want to create another table with 40% of the remaining data then something like select * into mynewtable2 from myoldtable where

Re: [GENERAL] [postgis-users] postgresql8.0 and postgis1.0.0

2005-02-16 Thread Obe, Regina DND\\MIS
The short answer is that you leave out all the postgis function calls in your dump, create a new database and load the postgis functions using the new scripts. Then you just load the data. I didn't find an easy way to selectively load tables and views using the .sql format (and I actually