[GENERAL] Permission Problems

2011-11-23 Thread Bill Thoen
r what am I missing? Is there a better way to tranfer info between my database and the web than by using a generic account? It sure seems like I'm granting too much access to too little a player. Any advice would be welcome. TIA, - Bill Thoen

Re: [GENERAL] Using the internal data dictionary

2011-11-18 Thread Bill Thoen
PM, David Johnston wrote: On Nov 17, 2011, at 22:17, Bill Thoen wrote: I need to assemble a complete data dictionary for project documentation and other purposes and I was wondering about the pros and cons of using the pg_catalog metadata. But I hesitate to poke around in here because I don&#

[GENERAL] Using the internal data dictionary

2011-11-17 Thread Bill Thoen
here's not some innocent looking table in there that acts as a doomsday device if you so much as read its first record, etc. I'm just not sure why this isn't more widely used or talked about. Regards, Bill Thoen GISnet http://gisnet.com 303-786-9961 -- Sent via pgsql-general ma

Re: [GENERAL] Re: [pgsql-general] Need Help With a A Simple Query That's Not So Simple

2011-11-01 Thread Bill Thoen
Thanks! Half the problem searching the 'Net for answers is knowing what it's called. Regards, Bill Thoen GISnet http://gisnet.com 303-786-9961 On Nov 1, 2011, at 10:01 AM, "James B. Byrne" wrote: > >> Date: Mon, 31 Oct 2011 16:51:02 -0600 >> From: Bill Th

Re: [GENERAL] Need Help With a A Simple Query That's Not So Simple

2011-10-31 Thread Bill Thoen
On 10/31/2011 5:05 PM, David Johnston wrote: From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Bill Thoen Sent: Monday, October 31, 2011 6:51 PM To: Postgrresql Subject: [GENERAL] Need Help With a A Simple Query That's Not So Simple [...] Wha

[GENERAL] Need Help With a A Simple Query That's Not So Simple

2011-10-31 Thread Bill Thoen
type farm_idforeign key to farms size crop_cd0041 = corn 0081=soybeans ...year ... Any help would be much appreciated. TIA, - Bill Thoen

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-16 Thread Bill Thoen
n you mix deadlines with ignorance. If you can't see the forest for the trees, cut the trees and you'll see there is no forest. Good point. I'm feeling a bit chainsaw-ish right now. -- *Bill Thoen* GISnet - www.gisnet.com 303-786-9961 -- Sent via pgsql-general mailing list (pgs

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-15 Thread Bill Thoen
On 3/15/2011 12:02 PM, Igor Neyman wrote: -Original Message- From: Bill Thoen [mailto:bth...@gisnet.com] Sent: Monday, March 14, 2011 11:31 PM To: pgsql-general@postgresql.org Subject: Partitioned Database and Choosing Subtables I've got a ver 8.4.5 partitioned data base with re

[GENERAL] Partitioned Database and Choosing Subtables

2011-03-14 Thread Bill Thoen
rs, bears, statecode FROM WildLife WHERE state_pt = statecode; However when I try anything other than a constant, it search EVERY partition, sequentially, which is not what I want it to do. So is there any way to specify the partition to search using a variable/column name? -- *Bill Thoen* GISnet

Re: [GENERAL] output screen in psql

2011-03-10 Thread Bill Thoen
On Wed, Mar 09, 2011 at 05:51:51PM -0800, abcdef wrote: > Hi, I use postgres in red hat linux . > When I use psql and select the content of the table . > I find the format is not tidy . > I change align and unalign , the output is not filful my requirement. > Any special setting that can change the

Re: [GENERAL] PG and dynamic statements in stored procedures/triggers?

2011-03-07 Thread Bill Thoen
On 3/7/2011 7:55 AM, Adrian Klaver wrote: On Monday, March 07, 2011 6:45:11 am Durumdara wrote: Hi! Thanks! How do I create "cursor" or "for select" in PGSQL with dynamic way? For example :tbl = GenTempTableName() insert into :tbl... insert into :tbl... insert into :tbl... for select :part

Re: [GENERAL] Logic AND between some strings

2011-03-07 Thread Bill Thoen
Just to make sure, you're asking for the logical AND, not the bitwise AND? In other words you're not talking about getting into bit shifting with << and >> and masking with &? For the logical AND, you need to use expressions that evaluate to TRUE or FALSE, and follow the rules in this "truth t

Re: [GENERAL] plsql question

2011-02-11 Thread Bill Thoen
On 2/10/2011 6:40 PM, Geoffrey Myers wrote: I am trying to write a plsql routine that will delete a range of characters based on their octal or hexadecimal values. Something like the 'tr' shell command will do: cat file| tr -d ['\177'-'\377'] Can't seem to figure this one out. Pointers woul

Re: [GENERAL] Directing Partitioned Table Searches

2011-02-07 Thread Bill Thoen
pecify the MI table instead of the base clu table. Thanks. That sounds simple enough. Since I want to automate this, I guess the next step is to learn how to create and execute a "dynamic" query. I think I know how to do that. -- *Bill Thoen* GISnet - www.gisnet.com <http:

[GENERAL] Directing Partitioned Table Searches

2011-02-04 Thread Bill Thoen
some queries w/o the overhead of searching partitions unnecessarily. Can it be done? Regards, -- *Bill Thoen* GISnet - www.gisnet.com <http://www.gisnet.com/> 1401 Walnut St., Suite C Boulder, CO 80302 303-786-9961 tel 303-443-4856 fax bth...@gisnet.com -- Sent via pgsql-general mailin

Re: [GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-03 Thread Bill Thoen
27;s intolerant of inconsistency. Probably a good thing for a database. On 2/2/2011 3:10 PM, Steve Crawford wrote: On 02/02/2011 01:35 PM, Bill Thoen wrote: Steve Crawford wrote: On 02/02/2011 12:17 PM, Bill Thoen wrote: I've got a large (and growing) database set up as a partitioned d

[GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-02 Thread Bill Thoen
37)) -> Index Scan using clu_co_pkey on clu_co clu (cost=0.00..8.31 rows=1 width=48) (actual time=0.090..0.096 rows=1 loops=1) Output: vfm.clu.source_disc, vfm.clu.ogc_fid, vfm.clu.statecd, vfm.clu.countycd, vfm.clu.tractnb

Re: [GENERAL] Need magic for identifieing double adresses

2010-09-16 Thread Bill Thoen
> On 9/16/2010 5:18 AM, Sam Mason wrote: >> On Thu, Sep 16, 2010 at 04:40:42AM +0200, Andreas wrote: >>> I need to clean up a lot of contact data because of a merge of customer >>> lists that used to be kept separate. >>> I allready know that there are double entries within the lists a

[GENERAL] How Big is Too Big for Tables?

2010-07-28 Thread Bill Thoen
hese much bigger files. So I'd appreciate anyone's advice here. TIA, - Bill Thoen

Re: [GENERAL] Re: What to do if space for database decrease and no additional hard drive is possible?

2010-07-26 Thread Bill Thoen
. You can also use table-partitioning with different tablespaces. Can you then unmount that USB drive without causing any damage to the other databases? -- - Bill Thoen GISnet - www.gisnet.com 303-786-9961 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] How to Declare Functions Containing OUT PArameters?

2010-07-14 Thread Bill Thoen
ey were and I'm working on a tight schedule, so I don't have much toim m eto explre. The compiler seems happier without them, and when it's happy, I'm happy. Tom Lane wrote: "Joshua D. Drake" writes: On Wed, 2010-07-14 at 12:21 -0600, Bill Thoen wrote:

[GENERAL] How to Declare Functions Containing OUT PArameters?

2010-07-14 Thread Bill Thoen
. The example below shows the problem, but it's just something to exercise the function calls and generate the error. Can anyone spot the screw-up in this little example? (the error message is listed below in the block comment) TIA, -Bill Thoen CREATE OR REPLACE FUNCTION fishy( s1 text,

[GENERAL] When to use Vacuum?

2010-06-24 Thread Bill Thoen
hing about deleted tables and I don't want to get into an intolerable situation someday (like disk full.) TIA, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Accessing a database form another database

2009-08-10 Thread Bill Thoen
bles in my GIS database to make maps for both of these projects. How do I reference a table that's in another database? Or should I organize my PostgreSQL data differently? Thanks, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

[GENERAL] How Do I Find the Date When A Table Was Last Changed?

2008-10-27 Thread Bill Thoen
Is there a way to find when data in a postgresql table was last changed? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] UPDATE and Indexes and Performance

2008-10-15 Thread Bill Thoen
low update, which is further slowed by the presence of indexes. So when doing a large update should I just drop the indexes first, or is there some good reason to keep them? Thanks, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] Update with a Repeating Sequence

2008-10-14 Thread Bill Thoen
Steve Atkins wrote: On Oct 14, 2008, at 9:04 AM, Bill Thoen wrote: I've got a table with repeated records that I want to make unique by adding a sequence code of 0,1,2,...,n for each set of repeated records. Basically, I want to turn: field_id | seq --+- 1 | 0

Re: [GENERAL] Update with a Repeating Sequence

2008-10-14 Thread Bill Thoen
field_id if curr_seq is null then NEW.seq := 0 else NEW.seq := curr_seq + 1 (You have to figure out how to build the trigger infrastructure...) If you need to do it on a table that is already populated, let us know. On Tue, Oct 14, 2008 at 9:21 AM, Bill Thoen <[EMAIL PROTECTED]>

Re: [GENERAL] Update with a Repeating Sequence

2008-10-14 Thread Bill Thoen
Grzegorz Jas'kiewicz wrote: alter table foo add newid sequencial; alter table foo drop field_id; alter table foo rename newid to field_id; I can't do that; I need to preserve the field_id values. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your s

[GENERAL] Update with a Repeating Sequence

2008-10-14 Thread Bill Thoen
| 0 4 | 0 5 | 0 6 | 0 into: field_id | seq --+- 1 | 0 2 | 0 3 | 0 3 | 1 3 | 2 4 | 0 4 | 1 5 | 0 6 | 0 What's the best way to that? TIA, - Bill Thoen -- Sent via pgsql-gener

[GENERAL] Bug In COPY TO?

2008-10-10 Thread Bill Thoen
I noticed that in PG 8.1 the docs for COPY TO say that you can use WITH HEADER, but when I do that it throws an error saying that this works only in CSV mode. Is this a bug or do I have something wrong with my syntax? COPY mytable TO '/data/out.txt' WITH HEADER DELIMITER '|' NULL '' ; -- Sen

Re: [GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
Josh Williams wrote: On Thu, 2008-10-09 at 10:59 -0600, Bill Thoen wrote: I'm trying to combine two tables, but I only want unique records based on the first two columns. Can UNION be used to join three-column tables but only include records based on the uniqueness of the first two co

Re: [GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
David Wilson wrote: On Thu, Oct 9, 2008 at 3:31 PM, Bill Thoen <[EMAIL PROTECTED]> wrote: Thanks, but that didn't work. That selected only the records from table1. That's why I warned you about it being written in gmail. :) I'm sorry, you had it right the

Re: [GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
David Wilson wrote: On Thu, Oct 9, 2008 at 1:48 PM, Bill Thoen <[EMAIL PROTECTED]> wrote: No, this won't work. Here's an example of my tables: Table1 1, 12, A 2, 16, B 8, 6, A 19, 9, C Table2 1, 13, D 2, 16, B 8, 6, B 12, 5, A select * from table1 union select tabl

Re: [GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
Raymond O'Donnell wrote: On 09/10/2008 17:59, Bill Thoen wrote: I'm trying to combine two tables, but I only want unique records based on the first two columns. Can UNION be used to join three-column tables but only include records based on the uniqueness of the first two colum

Re: [GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
Raymond O'Donnell wrote: On 09/10/2008 17:59, Bill Thoen wrote: I'm trying to combine two tables, but I only want unique records based on the first two columns. Can UNION be used to join three-column tables but only include records based on the uniqueness of the first two colum

Re: [GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
Raymond O'Donnell wrote: On 09/10/2008 17:36, Bill Thoen wrote: I'm trying to combine two tables, but I only want unique records based on the first two columns. Can UNION be used to join three-column tables but only include records based on the uniqueness of the first two colum

[GENERAL] Question About UNION

2008-10-09 Thread Bill Thoen
I'm trying to combine two tables, but I only want unique records based on the first two columns. Can UNION be used to join three-column tables but only include records based on the uniqueness of the first two columns? If not, how would I do this with PostgreSQL 8.1? -- Sent via pgsql-general

Re: [GENERAL] Why Does UPDATE Take So Long?

2008-10-01 Thread Bill Thoen
table. The alternative UPDATE farms SET prog_year='2007'; takes hours! I don't know how many because I gave up after waiting for 1.5 hrs. Thanks all, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Why Does UPDATE Take So Long?

2008-09-30 Thread Bill Thoen
Alvaro Herrera wrote: Bill Moran wrote: What I suspect is that the typical tuning advice applies here. I don't see any information about your configuration or your hardware setup. * What are shared_buffers set at? * What do the checkpoint configs look like? * In general, what does your post

Re: [GENERAL] Why Does UPDATE Take So Long?

2008-09-30 Thread Bill Thoen
fers are = 1000 #checkpoint_segments = 3 #checkpoint_timeout = 300 #checkpoint_warning = 30 What should I be looking for in the configuration to improve UPDATE performance? Thanks, - Bill Thoen Bill Moran wrote: In response to Bill Thoen <[EMAIL PROTECTED]>: Doesn't look like that's

Re: [GENERAL] Why Does UPDATE Take So Long?

2008-09-30 Thread Bill Thoen
Scott Marlowe wrote: On Tue, Sep 30, 2008 at 1:00 PM, Bill Thoen <[EMAIL PROTECTED]> wrote: Working with PG 8.1 I'm trying to update a char(4) column, and it's taking a very long time; 15 minutes so far and no end in sight. From the explain, it doesn't seem like it should ta

[GENERAL] Why Does UPDATE Take So Long?

2008-09-30 Thread Bill Thoen
QUERY PLAN Seq Scan on farms (cost=0.00..59144.07 rows=2772207 width=54) (1 row) TIA, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Need Some Explanation of an EXPLAIN

2008-09-26 Thread Bill Thoen
ions of the two tables followed by the query plan that my PostgreSQL wants to use. So I have two questions: 1.) Why won't it use the indexes? 2.) How can I make this update faster? TIA, Bill Thoen Table "public.id2" Column | Type | Modifiers ---+--

Re: [GENERAL] Problems with pg_dump and -t wildcards

2008-07-25 Thread Bill Thoen
Ah ha! I'm reading the wrong docs. Duh... I guess it's upgrade time! Thank you. Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: On Fri, 2008-07-25 at 11:36 -0600, Bill Thoen wrote: I'm having some problems with pg_dump and the -t switch

[GENERAL] Problems with pg_dump and -t wildcards

2008-07-25 Thread Bill Thoen
a tiny file with nothing but a couple of comments in it. Anyone know what's wrong? - Bill Thoen Here's what I get: $ psql -dspatial1 Welcome to psql 8.1.5, the PostgreSQL interactive terminal. ... spatial1=# \d List of relations Schema |

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Bill Thoen
Thanks for tip on OFFSET. That's just what I needed. It's so easy when you know the command you're looking for, and so hard when you know what you want to do but don't know what the command is called! Thanks, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-ge

[GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Bill Thoen
forum to ask this sort of question, I'd appreciate being pointed to a more appropriate one. TIA, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Importing undelimited files (Flat Files or Fixed-Length records)

2008-06-23 Thread Bill Thoen
Patrick TJ McPhee wrote: In article <[EMAIL PROTECTED]>, Bill Thoen <[EMAIL PROTECTED]> wrote: % I've got to load some large fixed-legnth ASCII records into PG and I was % wondering how this is done. The Copy command looks like it works only % with delimited files, and I woul

[GENERAL] Abnormal termination of PostgreSQL

2008-06-21 Thread Bill Thoen
erage_yield / 100 ;') and it also failed in the same manner in about the same time (~10 minutes). Does anyone know what happened and how I can fix it? - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Importing undelimited files (Flat Files or Fixed-Length records)

2008-06-19 Thread Bill Thoen
I've got to load some large fixed-legnth ASCII records into PG and I was wondering how this is done. The Copy command looks like it works only with delimited files, and I would hate to have to convert these files to INSERT-type SQL to run them through psql.. Is there a way one can specify a tab

Re: [GENERAL] PG Seg Faults Performing a Query

2007-08-24 Thread Bill Thoen
wn this apparent popen or fork problem I'd appreciate it. However, I managed to get the results I needed, so we could also call this "fixed via workaround." Thanks for the help, Tom and others! - Bill Thoen Tom Lane wrote: Bill Thoen <[EMAIL PROTECTED]> writes: (gdb

Re: [GENERAL] PG Seg Faults Performing a Query

2007-08-22 Thread Bill Thoen
() #5 0x00409153 in MainLoop () #6 0x0040b16e in main () Please tell me what it means if you can and if I can fix this problem. Thanks, - Bill Thoen Alvaro Herrera wrote: Martijn van Oosterhout escribió: That said, it would be nice if it returned an error instead of crashing.

Re: [GENERAL] PG Seg Faults Performing a Query

2007-08-22 Thread Bill Thoen
On Wed, Aug 22, 2007 at 09:46:21AM +1200, Andrej Ricnik-Bay wrote: > On 8/22/07, Bill Thoen <[EMAIL PROTECTED]> wrote: > > How would you suggest I try to track down this problem? > > Any suggestions? > postgres version? > Operating system? > Anything in the log(s)

Re: [GENERAL] PG Seg Faults Performing a Query

2007-08-22 Thread Bill Thoen
On Tue, Aug 21, 2007 at 04:38:42PM -0500, Scott Marlowe wrote: > On 8/21/07, Bill Thoen <[EMAIL PROTECTED]> wrote: > > How would you suggest I try to track down this problem? > > I run the following query: > > > > SELECT a.* FROM compliance_2006 a, ers_regions b &

[GENERAL] PG Seg Faults Performing a Query

2007-08-21 Thread Bill Thoen
How would you suggest I try to track down this problem? I run the following query: SELECT a.* FROM compliance_2006 a, ers_regions b WHERE a.fips_st_cd=b.fips_st AND a.fips_cnty_cd=b.fips_cou AND b.region =1 AND a.fips_st_cd='17' AND a.fips_cnty_cd='003'; and it works. But when I try this:

Re: [GENERAL] do you have an easy example of postgis and mapserver?

2007-08-21 Thread Bill Thoen
apObj, and then create a layerObj and add it to the map object, setting the properties for the connection. However, my knowledge of this approach is still very sketchy. Documentation is spread around, but the two sites you should peruse are the MapServer docs at: http://mapserver.gis.umn.edu/docs a

Re: [GENERAL] Searching for Duplicates and Hosed the System

2007-08-20 Thread Bill Thoen
what caused Postgresql to crater? What should I set the wrap limit to? What suggestions would you make for tracking down the exact problem and fixing it? Any help would be appreciated - Bill Thoen Tom Lane wrote: Bill Thoen <[EMAIL PROTECTED]> writes: Tom, here's th

Re: [GENERAL] Searching for Duplicates and Hosed the System

2007-08-19 Thread Bill Thoen
r, field_nbr, crop_cd, crop_status_cd, practice_cd, seq_nbr -> Seq Scan on compliance_2006 (cost=0.00..1039927.18 rows=18048318 width=160) (6 rows) On Sun, Aug 19, 2007 at 01:19:51PM -0400, Tom Lane wrote: > Bill Thoen <[EMAIL PROTECTED]> writes: > > I knew this

[GENERAL] Searching for Duplicates and Hosed the System

2007-08-19 Thread Bill Thoen
databases? Did I misconfigure something? Does anyone know what might be wrong? - Bill Thoen ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings