Re: [GENERAL] postgresql and Mac OS X

2008-11-07 Thread Tom Allison
adam_pgsql wrote: When I do the install script in contrib it says I have no rights to the directory. It was in /usr/local/pgsql/data/log and I changed it to /usr/local/pgsql/log. It was set as root.wheel with 755 permissions so I suspect it's mad at me because the postgres user was left in

Re: [GENERAL] postgresql and Mac OS X

2008-11-05 Thread Tom Allison
Tom Allison wrote: Scott Ribe wrote: 'make' is prefixed by /Developer/usr/bin/. The question is *why* the location is nonstandard. Starting with Xcode 3, all the developer tools get installed under the Developer directory, in order to allow one to easily have multiple versions of Xcode

Re: [GENERAL] postgresql and Mac OS X

2008-11-04 Thread Tom Allison
Grzegorz Jaśkiewicz wrote: I feel good about control here, and I certainly don't have any problems. So, please don't whine :) Especially since I want to run cvs head, and be able to actually update it from cvs when I want to, that's the only choice. Postgresql is so easy to get from sources,

Re: [GENERAL] postgresql and Mac OS X

2008-11-04 Thread Tom Allison
Francisco Figueiredo Jr. wrote: On Tue, Nov 4, 2008 at 8:21 AM, Tom Allison [EMAIL PROTECTED] wrote: Grzegorz Jaśkiewicz wrote: I feel good about control here, and I certainly don't have any problems. So, please don't whine :) Especially since I want to run cvs head, and be able to actually

Re: [GENERAL] postgresql and Mac OS X

2008-11-04 Thread Tom Allison
Tom Lane wrote: Tom Allison [EMAIL PROTECTED] writes: I tried getting a source install on my mac book yesterday and today. It's not a normal *nix installation. The location of the files are all non-standard. 'make' is prefixed by /Developer/usr/bin/. The question is *why* the location

[GENERAL] postgresql installation - PL/???

2008-11-04 Thread Tom Allison
This should be a dumb question: --with-perl I don't see that I have to do this in order to load pl/perl as a function/trigger language option. So I should assume that this will compile pl/perl in rather than having it available as a loadable function. Nice for optimizations? I'm assuming

Re: [GENERAL] postgresql and Mac OS X

2008-11-04 Thread Tom Allison
Scott Ribe wrote: 'make' is prefixed by /Developer/usr/bin/. The question is *why* the location is nonstandard. Starting with Xcode 3, all the developer tools get installed under the Developer directory, in order to allow one to easily have multiple versions of Xcode installed alongside each

Re: [GENERAL] postgresql and Mac OS X

2008-10-29 Thread Tom Allison
Grzegorz Jaśkiewicz wrote: I use postgresql on MBP, current head, for testing and development. Just from sources, it won't bite :) you just have to add user postgres to your system, place $PGDATA wherever you feel you should, and you're done. Yes. I actually started using Nix from

[GENERAL] postgresql and Mac OS X

2008-10-28 Thread Tom Allison
Relatively simple question that I hope doesn't start too much Flame. I have recently had the opportunity to reformat my macbook hard drive, many thanks to suggestions from the actual Apple support team. That's not why I'm writing to the postgres group... But it's related. I have a fresh

Re: [GENERAL] postgresql and Mac OS X

2008-10-28 Thread Tom Allison
Niklas Johansson wrote: On 28 okt 2008, at 23.41, Tom Allison wrote: I was using macports but got into a cluster-F on versions and multiple installs. After a spell I had all four versions 8.0 - 8.3 installed in order to use postgres, ruby, perl, and rails together. Do you mean

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-09-29 Thread Tom Allison
You can always add a constraint that these columns cannot be NULL themselves. That removes this problem. On Sep 28, 2008, at 11:17 PM, Klint Gore [EMAIL PROTECTED] wrote: Matthew Wilson wrote: I'm trying to comprehend how NULL values interact with unique indexes. It seems like I can insert

Re: [GENERAL] SUMMARY: Solaved. apache perl cgi script cant load libpq.5.dylib on mac os tiger

2008-06-24 Thread Tom Allison
I found a similar problem only with a slight variation. postgresql, for me, is installed in /opt/local/ with the particular file being located at: /opt/local/lib/postgresql83/libpq.5.dylib This is all a part of the mac ports installation for apache2 and postgres. It seems that the problem

[GENERAL] inheritance...

2008-04-27 Thread Tom Allison
Ran into something really unexpected, but then I've never tried using inherited tables. I have a master table (named master) that has two child tables. create table master ( id serial, foo varchar(20), bar varchar(20), constraint foobar_master unique (foo,bar) ); Now when I do this

[GENERAL] inheritance. more.

2008-04-27 Thread Tom Allison
create table master ( id serial, mdn varchar(11), meid varchar(18), min varchar(11), constraint mmm_master unique (mdn, meid, min) ); insert into master(mdn, meid, min) select mdn, meid, min from test_data where meid != '00' limit 10; Everything works up to this point...

Re: [GENERAL] Need to update all my 60 million rows at once without transactional integrity

2008-04-23 Thread Tom Allison
Far from being an expert on postgres, but there are two ideas-- assuming that you cannot afford the time it would take to simply UPDATE and wait... Write a script to update all the rows, one at a time. Lowest impact to operations but would take a very long time. Assuming you have a

[GENERAL] mac ports question

2008-04-05 Thread Tom Allison
I ran into a problem today where somewhere my port of postgresql82 just stopped working. I'm largely an idiot on Mac because I use is as a workstation/development box and do most of the real system related work on my debian boxes. But I don't know how to get the port working again. Then I

Re: [GENERAL] mac ports question

2008-04-05 Thread Tom Allison
. And no config file to make the logs hyper verbose. This stinks. I can find all this stuff on my Debian boxes, but on this mac -- have no clue where things live. Stephan Szabo wrote: On Sat, 5 Apr 2008, Tom Allison wrote: I ran into a problem today where somewhere my port of postgresql82

Re: [GENERAL] power failure....

2007-12-03 Thread Tom Allison
I was able to get things up and running OK. Don't have any WAL that I'm aware of, but it managed to have another power failure hours later. I seems that the UPS is more POS than UPS. I think the battery is dead. On Dec 2, 2007, at 3:52 AM, Greg Smith wrote: On Sat, 1 Dec 2007, Joshua

[GENERAL] CPU

2007-12-03 Thread Tom Allison
is there much of a difference in performance between a XEON, dual core from intel and a dual core AMD 64 CPU? I need a bit of an upgrade and am not sure which, if any, have a significant advantage for postgres databases. ---(end of

Re: [GENERAL] power failure....

2007-12-01 Thread Tom Allison
Tom Lane wrote: Tom Allison [EMAIL PROTECTED] writes: 2007-11-30 19:35:20 EST PANIC: could not locate a valid checkpoint record Ugh :-(. pg_resetxlog should get you back into the database, but it's anybody's guess whether and how badly the contents will be corrupted. I would recommend

Re: [GENERAL] power failure....

2007-12-01 Thread Tom Allison
Tom Lane wrote: Tom Allison [EMAIL PROTECTED] writes: 2007-11-30 19:35:20 EST PANIC: could not locate a valid checkpoint record Ugh :-(. pg_resetxlog should get you back into the database, but it's anybody's guess whether and how badly the contents will be corrupted. I would recommend

[GENERAL] power failure....

2007-11-30 Thread Tom Allison
How do I restart the following with some level of sanity? 2007-11-30 19:35:20 EST LOG: could not load root certificate file root.crt: no SSL error reported 2007-11-30 19:35:20 EST DETAIL: Will not verify client certificates. 2007-11-30 19:35:20 EST LOG: database system was interrupted at

[GENERAL] IP addresses

2007-11-19 Thread Tom Allison
I am planning on doing a LOT of work with ip addresses and thought that the inet data type would be a great place to start. But I'm not sure how this works in with accessing the addresses. In perl or ruby how is the value returned? Or should I stricly use host() and other functions to be

Re: [GENERAL] Debian problem...

2007-09-28 Thread Tom Allison
On Sep 12, 2007, at 3:52 AM, Tino Wildenhain wrote: Hi, Tom Allison schrieb: On Sep 11, 2007, at 5:49 AM, Tom Allison wrote: I was able get my database working again. Never figured out why... My database data (sorry about the redundancy there) is sitting on a RAID1 array with LVM

Re: [GENERAL] Debian problem...

2007-09-11 Thread Tom Allison
. Regards. Tom Allison wrote: Ran into a problem. I hosed up postgresql by deleting the data directory. So I thought I would just uninstall and reinstall postgres using Debian packages. Now I have nothing working. Wondering if anyone here has any suggestions on what to do with a Debian

Re: [GENERAL] Debian problem...

2007-09-11 Thread Tom Allison
On Sep 11, 2007, at 5:49 AM, Tom Allison wrote: I was able get my database working again. Never figured out why... My database data (sorry about the redundancy there) is sitting on a RAID1 array with LVM and ReiserFS. I've heard some dissention about the use of ReiserFS

[GENERAL] Debian problem...

2007-09-10 Thread Tom Allison
Ran into a problem. I hosed up postgresql by deleting the data directory. So I thought I would just uninstall and reinstall postgres using Debian packages. Now I have nothing working. Wondering if anyone here has any suggestions on what to do with a Debian installation. If not, I'm

[GENERAL] pg_dump

2007-07-30 Thread Tom Allison
just checking to be sure. pg_dump does not support SSL connections? I have been using pgsql with ssl connections to my database. But when I tried pg_dump I was hit with the no ssl error message. Didn't see an option for it in the RTFM so .. Am I correct in assuming that pg_dump/pg_restore

Re: [GENERAL] CASE in ORDER BY clause

2007-07-20 Thread Tom Allison
Uwe C. Schroeder wrote: On Saturday 07 July 2007, Lew wrote: So if your RDBMS sorts NULLs after all other values, then from select start_date from show_date order by case when start_date CURRENT_DATE then start_date end desc, case when start_date = CURRENT_DATE then start_date end asc;

Re: [GENERAL] When is PostgreSQL 8.3 slated for release?

2007-07-20 Thread Tom Allison
Keaton Adams wrote: I am being asked by management when PostgreSQL 8.3 will become generally available. Is there an updated timeline for 8.3? You know the answer is supposed to be when it's ready but we all know Management doesn't like that kind of an answer. Of course, you could just

Re: [GENERAL] multirow insert

2007-07-13 Thread Tom Allison
On Jul 13, 2007, at 2:11 PM, A. Kretschmer wrote: am Fri, dem 13.07.2007, um 18:50:26 +0200 mailte Zlatko Mati? folgendes: When using multirow INSERT INTO...VALUES command, are all rows inserted in a batch, or row by row? Within one transaction, yes. Trust me... It's MUCH faster

[GENERAL] Mac OS X

2007-07-12 Thread Tom Allison
I tried to install postgres onto my macbook via 'fink' and don't like it all that much. I decided to install from source, it's a fallback to my slackware days. But fink already created a user postgres and I can't seem to find anything to change it's configuration settings for shell, home

Re: [GENERAL] Duplicate Unique Key constraint error

2007-07-11 Thread Tom Allison
On Jul 10, 2007, at 3:09 PM, Tom Lane wrote: Harpreet Dhaliwal [EMAIL PROTECTED] writes: Transaction 1 started, saw max(dig_id) = 30 and inserted new dig_id=31. Now the time when Transaction 2 started and read max(dig_id) it was still 30 and by the time it tried to insert 31, 31 was

[GENERAL] deleting rows with foreign keys

2007-07-11 Thread Tom Allison
Here's my table: Table public.tokens Column |Type | Modifiers ---+- + token_idx | bigint

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-17 Thread Tom Allison
On Jun 16, 2007, at 3:38 PM, John Smith wrote: guys, love both tools but php @ 2.5 *billion* google results is far more popular than postgresql @ 25 million google results. *if* somebody's gotto adapt it's not php. php does what it does best in a way that stuffy academics don't get. I would

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-17 Thread Tom Allison
On Jun 16, 2007, at 4:12 PM, Uwe C. Schroeder wrote: On Saturday 16 June 2007, John Smith wrote: guys, love both tools but php @ 2.5 *billion* google results is far more popular than postgresql @ 25 million google results. *if* somebody's gotto adapt it's not php. php does what it does best

Re: [GENERAL] PHP sucks!! - was: persistent db connections in PHP

2007-06-17 Thread Tom Allison
On Jun 16, 2007, at 7:51 PM, Leif B. Kristensen wrote: On Saturday 16. June 2007 23:34, Erick Papadakis wrote: How much value you derive from a language depends on how you use it. After playing for years with Perl, and now with Python and Ruby, I think PHP is still where it's at. I too

Re: [GENERAL] Using the GPU

2007-06-16 Thread Tom Allison
On Jun 11, 2007, at 4:31 AM, Alban Hertroys wrote: Alexander Staubo wrote: On 6/8/07, Billings, John [EMAIL PROTECTED] wrote: If so which part of the database, and what kind of parallel algorithms would be used? GPUs are parallel vector processing pipelines, which as far as I can tell

Re: [GENERAL] INSERT ... RETURNING in v8.2

2007-06-16 Thread Tom Allison
On Jun 12, 2007, at 10:18 AM, Vincenzo Romano wrote: Hi all. I'm trying to use this wonderful feature (thanks to anyone who suggested/committed/implemented it). According to the documentation: (http://www.postgresql.org/docs/8.2/interactive/sql-insert.html) The optional RETURNING clause

Re: [GENERAL] INSERT ... RETURNING in v8.2

2007-06-16 Thread Tom Allison
On Jun 12, 2007, at 11:40 AM, Vincenzo Romano wrote: On Tuesday 12 June 2007 16:35:05 Martijn van Oosterhout wrote: On Tue, Jun 12, 2007 at 04:18:32PM +0200, Vincenzo Romano wrote: Well, at least on v8.2.4 I cannot return count(*), that is the number of lines actually inserted into the

Re: [GENERAL] Using the GPU

2007-06-16 Thread Tom Allison
Tom Lane wrote: Alexander Staubo [EMAIL PROTECTED] writes: On 6/16/07, Tom Allison [EMAIL PROTECTED] wrote: It might make an interesting project, but I would be really depressed if I had to go buy an NVidia card instead of investing in more RAM to optimize my performance! g Why does

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-15 Thread Tom Allison
Gregory Stark wrote: The insert is deadlocking against the update delete. The problem is that the insert has to lock the records to be sure they aren't deleted. This prevents the update for updating them. But the update has already updated some other records which the insert hasn't referred to

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-15 Thread Tom Allison
Gregory Stark wrote: Tom Allison [EMAIL PROTECTED] writes: The other approach would be to use an external file to queue these updates and run them from a crontab. Something like: and then run a job daily to read all these in to a hash (to make them unique values) and then run one SQL

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-14 Thread Tom Allison
Gregory Stark wrote: I'm still not precisely clear what's going on, it might help if you posted the actual schema and the deadlock message which lists the precise locks that deadlocked. Are any of the DML you mention on other tables on those tables with foreign key references to this one?

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-14 Thread Tom Allison
Gregory Stark wrote: I'm still not precisely clear what's going on, it might help if you posted the actual schema and the deadlock message which lists the precise locks that deadlocked. Are any of the DML you mention on other tables on those tables with foreign key references to this one?

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-14 Thread Tom Allison
Tom Allison wrote: Gregory Stark wrote: I'm still not precisely clear what's going on, it might help if you posted the actual schema and the deadlock message which lists the precise locks that deadlocked. Are any of the DML you mention on other tables on those tables with foreign key

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-14 Thread Tom Allison
Terry Fielder wrote: My 2 cents: I used to get a lot of these sharelock problems. Users using different records, but same tables in different order. (apparently 7.x was not as good as 8.x at row level locking) I was advised to upgrade from 7.x to 8.x I did, and all those sharelock problems

Re: [GENERAL] When should I worry?

2007-06-12 Thread Tom Allison
On Jun 12, 2007, at 12:00 AM, Greg Smith wrote: On Mon, 11 Jun 2007, Tom Allison wrote: All of this was run on a Pentium II 450 MHz with 412MB RAM and a software linear 0 pair or UDMA 66 7200RPM 8MB Cache drives (really old) on seperate IDE channels with ReiserFS disk format. Sometimes

Re: [GENERAL] When should I worry?

2007-06-11 Thread Tom Allison
Greg Smith wrote: On Mon, 11 Jun 2007, Steve Crawford wrote: In my experience the more common situation is to go off a cliff. Yeah, I think the idea that you'll notice performance degrading and be able to extrapolate future trends using statistical techniques is a bit...optimistic.

[GENERAL] When should I worry?

2007-06-10 Thread Tom Allison
I've started a database that's doing wonderfully and I'm watching the tables grow and a steady clip. Performance is great, indexes are nice, sql costs are low. As far as I can tell, I've done a respectable job of setting up the database, tables, sequence, indexes... But a little math

Re: [GENERAL] When should I worry?

2007-06-10 Thread Tom Allison
On Jun 10, 2007, at 2:14 PM, Joe Conway wrote: Bill Moran wrote: Tom Allison [EMAIL PROTECTED] wrote: If the user base gets to 100 or more, I'll be hitting a billion rows before too long. I add about 70,000 rows per user per day. At 100 users this is 7 million rows per day. I'll hit

Re: [GENERAL] left outer join and values()

2007-06-01 Thread Tom Allison
can't do this at work (Oracle 8/9). On May 31, 2007, at 11:48 PM, Tom Lane wrote: Tom Allison [EMAIL PROTECTED] writes: select v.history.idx, v.token_idx from ( values ((3,1),(3,2))) as v(history_idx, token_idx) left outer join history_token ht on v.history_idx = ht.history_idx and v.token_idx

[GENERAL] left outer join and values()

2007-05-31 Thread Tom Allison
I did something like this with a single VALUES statment [eg: VALUES ((2),(3))] and thought I could extend this to two columns But I'm not having any luck. BTW - history_idx is an integer and token_idx is a bigint. select v.history.idx, v.token_idx from ( values ((3,1),(3,2))) as

[GENERAL] removing a restriction

2007-05-30 Thread Tom Allison
I have a column that was created with a 'not null' restriction. How do I remove it? ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] removing a restriction

2007-05-30 Thread Tom Allison
alter TABLE user_history ALTER COLUMN seen_as set not null; turns it on... I want to turn it off On May 30, 2007, at 9:05 PM, Joshua D. Drake wrote: Tom Allison wrote: I have a column that was created with a 'not null' restriction. How do I remove it? alter table set

[GENERAL] prepare()

2007-05-29 Thread Tom Allison
Is there an advantage to using something like $dbh-prepare($sql) if the SQL is going to be run once within the scope of the code? The code block may be run many times in a minute as in a function call --- while () { insert_something($_); } Will the prepare statement be cached @ the

[GENERAL] arrays in where

2007-05-28 Thread Tom Allison
I have a table select * from history; idx | tokens -+- 2 | {10633,10634,10636} And the values in the tokens field are taken from sequence values from another table. Can I use this kind of storage to identify all the tokens in the first table that make

Re: [GENERAL] why postgresql over other RDBMS

2007-05-25 Thread Tom Allison
I think the general topic got lost in the weeds there... But it would be helpful if you identified what you care about in a database. That drives a lot of these decisions. Example: My brother uses MySQL and I use Postgresql. His reasons for MySQL: More books on it at the bookstore. It was

Re: [GENERAL] bytea perl

2007-05-25 Thread Tom Allison
I think the quote() part for bytes is deprecated already? my $string = ( . join($glue, map{$dbh-quote($_,PG_BYTEA)} @ $tokens) . ); returns Unknown type 17, defaulting to VARCHAR as a warning... On May 24, 2007, at 1:11 PM, [EMAIL PROTECTED] wrote: Hi, First, I would advise never

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Tom Allison
You've addressed cost and performance. Not much left. Try it out for yourself and see if it works for you. On May 24, 2007, at 4:06 AM, Jasbinder Singh Bali wrote: Hi I was wondering, apart from extensive procedural language support and being free, what are other major advantages of

[GENERAL] using bytea vartype non-prepared statements

2007-05-24 Thread Tom Allison
I would like to build a sql statement in perl and execute it without binding parameters if possible. But I also need to use bytea variable type because I'm storing two byte characters (Big5, utf8...) In case of using a varchar and ASCII I would simply write a sql statement like this:

[GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
Cannot mix placeholder styles quot;:fooquot; and quot;$1quot; at / sw/lib/perl5/5.8.6/darwin-thread-multi-2level//DBD/Pg.pm line 174. I keep finding it from time to time on one script I have and I have no clue what it's telling me. ---(end of

[GENERAL] bytea perl

2007-05-23 Thread Tom Allison
I've been running into problems with some characters that I believe can be solved using bytea variable type instead of varchar() I'm picking up data from email and trying to put it into a table. I'm trying to merge two different types of SQL and I'm really not sure how this can be done...

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Tom Allison
On May 23, 2007, at 12:54 PM, Scott Ribe wrote: *Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic locking), never the database level. Pure, utter,

Re: [GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
will get the type of message you saw. Probably your query is being built by the program where some odd character is occasionally creeping in where you don't expect it. I assume that the html entity references ('quot;') are not actually in the error message. Susan Cassidy Tom Allison [EMAIL

Re: [GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
query is being built by the program where some odd character is occasionally creeping in where you don't expect it. I assume that the html entity references ('quot;') are not actually in the error message. Susan Cassidy Tom Allison [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 05/23/2007 03

Re: [GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
never mind. first query after a restart is slow... On May 23, 2007, at 10:14 PM, Tom Allison wrote: I noticed that the option for 'E' is not enabled in 8.2 by default ( standard_conforming_strings (boolean) ). I turned this on and the SQL statements went from 0.5 sec to 3.8 sec each

Re: [UNSURE] Re: [GENERAL] autovacuum

2007-05-13 Thread Tom Allison
From what you described, I am running with autovacuum. Makes sense to make a good idea default in the distro builds... On May 13, 2007, at 9:49 AM, Michael Fuhr wrote: On Sat, May 12, 2007 at 03:48:14PM -0400, Tom Allison wrote: I noticed that under 8.2 the autovacuum isn't running (logging

[GENERAL] postgres upgrade

2007-05-12 Thread Tom Allison
I'm trying to upgrade from 8.1 to 8.2. Apparently the upgrade I just ran through installed a second database on my server. I was hoping that the debian configuration would migrate this for me. I recall there was once a time when it would ask you about moving data from old to new databases.

[GENERAL] stuck on values in 8.2

2007-05-12 Thread Tom Allison
OK, after reviewing many emails and what I was trying to do I upgraded from 8.2. Seems to work as it did in 8.1 which is a good start. I'm doing all of this so I can use the 'values' that was described as being something like: select * from (values ('one','two','three')) foo; But

Re: [GENERAL] stuck on values in 8.2

2007-05-12 Thread Tom Allison
=7094 width=12) Filter: (user_idx = 15) (18 rows) On May 12, 2007, at 11:08 AM, Gregory Stark wrote: Tom Allison [EMAIL PROTECTED] writes: OK, after reviewing many emails and what I was trying to do I upgraded from 8.2. Seems to work as it did in 8.1 which is a good start

Re: [GENERAL] stuck on values in 8.2

2007-05-12 Thread Tom Allison
of doing dates and they are all weird. Now I have to go impliment it into my code and see what it actually does. I'm hoping to peel 3-5 seconds off each process! On May 12, 2007, at 12:06 PM, Richard Broersma Jr wrote: --- Tom Allison [EMAIL PROTECTED] wrote: This is getting really ugly

Re: [GENERAL] stuck on values in 8.2

2007-05-12 Thread Tom Allison
error. Or am I looking at something like: insert into tokens select .. values(..) as values(token) left outer join tokens using (token) (Am I getting the hang of this any better?) On May 12, 2007, at 12:06 PM, Richard Broersma Jr wrote: --- Tom Allison [EMAIL PROTECTED] wrote

Re: [GENERAL] stuck on values in 8.2

2007-05-12 Thread Tom Allison
, the time to process has gone from 100s to 1s. On May 12, 2007, at 2:23 PM, Tom Allison wrote: Thank you very much for all your help!!! Solved this one rather nicely: my $glue = q{'),(E'}; my $string = (E' . join($glue, map{quotemeta } @$tokens) . '); my $sql =SQL; SELECT values.token

[GENERAL] autovacuum

2007-05-12 Thread Tom Allison
This database is working GREAT!!! I noticed that under 8.2 the autovacuum isn't running (logging) every 60s like I'm used to seeing. I pretty much just took the defaults in the postgresql.conf file since that's always seemed to work before. I'm not making a lot of changes to the database

Re: [UNSURE] Re: [GENERAL] Streaming large data into postgres [WORM like applications]

2007-05-11 Thread Tom Allison
One approach would be to spool all the data to a flat file and then pull them into the database as you are able to. This would give you extremely high peak capability. On May 11, 2007, at 10:35 PM, Dhaval Shah wrote: I do care about the following: 1. Basic type checking 2. Knowing

[GENERAL] pgsql and Mac OS X

2007-04-30 Thread Tom Allison
I'm trying to find the binaries for pgsql (the client) for Mac OSX. Is there any way to get these without installing all of postgres on a computer? I'm not going to use postgres on my MacBook, just connect to it. ---(end of broadcast)--- TIP 3:

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Tom Allison
. pg_config shows it configured with a prefix path that doesn't exist: /System/Library/CoreServices/RemoteManagement/sqldb And I'm starting to think I'm way out of my league on how to get this working. On Apr 30, 2007, at 3:45 PM, Erik Jones wrote: On Apr 30, 2007, at 2:28 PM, Tom Allison wrote

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Tom Allison
On Apr 30, 2007, at 5:20 PM, Randal L. Schwartz wrote: Tom == Tom Allison [EMAIL PROTECTED] writes: Tom /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/ psql That's not on my mac. Must be some bolt-on you installed. -- Randal L. Schwartz - Stonehenge Consulting Services

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Tom Allison
That might be the thing to do. I'm wondering how Apple Remote Desktop got onto my machine and how to remove it. On Apr 30, 2007, at 5:38 PM, Michael Glaesemann wrote: On Apr 30, 2007, at 16:20 , Randal L. Schwartz wrote: Tom == Tom Allison [EMAIL PROTECTED] writes: Tom /System/Library

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Tom Allison
Please update the Randall Notebook to read: sudo fink install dbd-pg-unified-pm586 Perhaps this will be done in time for YAPC? On Apr 30, 2007, at 6:22 PM, Randal L. Schwartz wrote: Tom == Tom Lane [EMAIL PROTECTED] writes: Tom What you can do if you want to build PG from source is build

[GENERAL] understanding output from Explain

2007-04-22 Thread Tom Allison
Seq Scan on - is this just a FULL TABLE scan? I'm familiar with Oracles explain plans and terminology. But not so much so with psql... ---(end of broadcast)--- TIP 4: Have you searched our list archives?

[GENERAL] permissions

2007-04-21 Thread Tom Allison
I am not sure how the permissions work anymore. What I want to do is create a database and have a user create all the tables and rules. I created the database from user postgres. I then set the owner of the database to my userid my userid created a number of tables and rules. I then tried

[GENERAL] Debian upgrade and PGSQL pid file

2007-04-10 Thread Tom Allison
A while back I threw together a postgresql installation on a computer with a RAID disk for performance reasons. I never got it working 100% since it was just a quick weekend adventure and I never expected much to come of it. Famous last words... I'm not trying to upgrade the database via

Re: [GENERAL] Database performance comparison paper.

2007-02-18 Thread Tom Allison
Leif B. Kristensen wrote: On Friday 16. February 2007 07:10, Tom Lane wrote: Perhaps this paper can be described as comparing an F-15 to a 747 on the basis of required runway length. There ought to be a proper name for this kind of pseudo-technical Gonzo journalism. The Internet is full of

Re: [GENERAL] PG Email Client

2007-02-03 Thread Tom Allison
Alban Hertroys wrote: Jean-Gérard Pailloncy wrote: I do not have test numbers rigth now, because I need first to configure the box for virtual hosting, then dspam. It would be really wonderful if someone managed to combine this with dspams own database. Maybe it'd be possible to pull dspam's

Re: [GENERAL] PG Email Client

2007-01-29 Thread Tom Allison
Tino Wildenhain wrote: Sim Zacks schrieb: Are there any postgresql based email clients that anyone has experience with? Well client would be the wrong approach imho, but there is for example dbmail which can use postgres as storage for mail and opens a lot of the usecases above. You would

Re: [GENERAL] indexes

2006-11-25 Thread Tom Allison
Ben wrote: Yes, it does. So of course it depends on how you use it to know what's going to be more efficient. For instance, if the rows in this table contain strings of more than a few bytes, and more than a couple tables reference this table with a foreign key, then you will quickly start to

[GENERAL] indexes

2006-11-24 Thread Tom Allison
I notice a lot of places where people use the approach of creating an index and a unique key like: CREATE TABLE foo ( idx SERIAL PRIMARY KEY, name varchar(32) UNIQUE NOT NULL ) instead of CREATE TABLE foo ( name varchar(32) PRIMARY KEY ) If the name is NEVER going to change, is there

[GENERAL] pg_hba.conf

2006-11-19 Thread Tom Allison
Ran into a mystery that I can't seem to figure out I want to authenticate using SSL for all external IP addresses that I have in my subnet. I also want to be able to authenticate via non-SSL for localhost (not unix socket). I thought something like this would work: host all

Re: [GENERAL] pg_hba.conf

2006-11-19 Thread Tom Allison
Tom Lane wrote: Tom Allison [EMAIL PROTECTED] writes: host allall127.0.0.1/32 md5 hostsslallall192.168.0.1/24 md5 ^^ That needs to be 192.168.0.0/24 ... as is, it won't match anything. But I have a localhost client

[GENERAL] serial data type

2004-09-25 Thread Tom Allison
Can I use the serial data type in lieu of an 'auto_number' field? I asked something like this some months ago and it seems that auto_number fields were addressed through a combination of triggers and procedures to ensure that there were do duplicate KEYS generated. Is it realistic to use the

Re: [GENERAL] serial data type

2004-09-25 Thread Tom Allison
Doug McNaught wrote: Is it realistic to use the serial data type as a KEY? Lots and lots of people do. If you're just looking for a unique key column for a single table, it works fine. -Doug This is essentially what I'm looking for. Any idea how to set up a timestamp=now on every insert/update

Re: [GENERAL] Sql injection attacks

2004-07-27 Thread Tom Allison
Jim Seymour wrote: Bill Moran [EMAIL PROTECTED] wrote: [snip] I agree with Bill. Years ago (more years than I care to recall) I read a book on structured systems design (IIRC) that advised one should condition/convert data as early as possible in the process, throughout the design. Amongst the

Re: [GENERAL] Sql injection attacks

2004-07-27 Thread Tom Allison
Geoff Caplan wrote: Hi folks Seems we have two schools of thought: 1) The validation/escaping approach, supported by Bill and Jim 2) The don't mix data with code approach supported by Peter and Greg. As I learn more about the issues, I am increasingly veering towards the second approach. Now I

[GENERAL] grant user access

2004-07-17 Thread Tom Allison
I'm stuck. How do I grant select, insert, delete, update rights to an entire database? I tried this: GRANT SELECT, INSERT, UPDATE, DELETE ON DATABASE foo TO bar; and it returns ERROR: syntax error at or near INSERT at character 14 I'm just not getting it, it sure looks like I should be able to.

[GENERAL] [Fwd: Postfix SMTP server: errors from avalanche.netmar.com[198.69.224.177]]

2004-06-17 Thread Tom Allison
Can someone tell me if I'm blocking spam here of if I'm somehow blocking some of the emails from this list? I'm definitely getting email, but I keep getting these messages popping up on my servers. Does anyone know why? Original Message Return-Path: [EMAIL PROTECTED]

[GENERAL] perl access

2004-06-14 Thread Tom Allison
I'm used to using the DBI modules in perl. The online docs mention DBD as expiremental. I'm thinking of sticking with DBI, unless there's some compelling reason to do otherwise. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet,

[GENERAL] perl access

2004-06-14 Thread Tom Allison
I'm stuck on something stupid. I'm trying to use perl to open up a database handle and I can't find the right database dsn string. my $data_source = dbi:Pg:mydatabase; my $username = mydatebasereader; my $auth = secret; my $dbh = DBI-connect($data_source, $username, $auth); DBI

[GENERAL] pg_hba auth failure

2004-06-14 Thread Tom Allison
pg_hba.conf entry: host all all 192.168.0/24md5 I get the error 2004-06-14 20:51:48 [21072] LOG: invalid entry in pg_hba.conf file at line 89, token md5 When I connect as: psql -U postfix -h 192.168.0.5 postfix This user works locally with version

  1   2   >