[GENERAL] Help with query to return indexes (including functional ones!) on a given table

2008-09-22 Thread Philip Hallstrom
Hi all - I'm trying to add functional index support to Rails' Active Record and am getting stuck when it comes to a method Rails has to print out the indexes associated with a given table. The SQL being run is below: SELECT distinct i.relname, d.indisunique, a.attname FROM pg_class t, pg_class

Re: [GENERAL] Bigtime scaling of Postgresql (cluster and stuff I suppose)

2007-08-27 Thread Philip Hallstrom
Bill Moran [EMAIL PROTECTED] writes: First off, clustering is a word that is too vague to be useful, so I'll stop using it. Right. MySQL Cluster, on the other hand, is a very specific technology. http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html It is, however, capable of being d*mn

Re: [GENERAL] Running OS-level programs from Postgres?

2007-06-20 Thread Philip Hallstrom
Maybe this is a well duh kind of question, or maybe there's no straightforward way to do it, but is there any way that I could have a pg function initiate a process on the host system? Specifically I'd like to script an email to send off on an insert trigger, but the ability to initiate system

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Philip Hallstrom
That's not on my mac. Must be some bolt-on you installed. So how did you get it working? (I have no idea how this file got there. Wouldn't know where to begin) Coming in late so maybe someone already posted this, but I used this: http://www.postgresqlformac.com/ I wanted the server too,

Re: [GENERAL] Nice, web-based SNMP-Frontend for pgsnmpd?

2007-04-03 Thread Philip Hallstrom
I've just stumbled across pgsnmpd. It works quite well, though I haven't yet found a web-based monitoring software that works well with pgsnmpd. The problem is that pgsnmpd exportsa bunch of values _per_ database. (The output of snmpwalk looks something like PGSQL-MIB::pgsqlDbDatabase.1.1.3 =

Re: [GENERAL] Connection Pooling for Postgres

2006-10-18 Thread Philip Hallstrom
Is there any inbuilt facility in postgres for connection pooling .. ?? Not built in, but... http://pgpool.projects.postgresql.org/ Never used it myself... ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] postgresql rising

2006-09-21 Thread Philip Hallstrom
On Wed, 2006-09-20 at 16:38 -0500, Philip Hallstrom wrote: On Wed, Sep 20, 2006 at 10:10:56AM -0500, Tony Caduto wrote: For a high level corp manager all they ever hear about is MS SQL Server, Oracle and DB2, and the more it costs the more they think it is what they need :-) I think

Re: [GENERAL] postgresql rising

2006-09-20 Thread Philip Hallstrom
On Wed, Sep 20, 2006 at 10:10:56AM -0500, Tony Caduto wrote: For a high level corp manager all they ever hear about is MS SQL Server, Oracle and DB2, and the more it costs the more they think it is what they need :-) I think that description is false. At a certain point in the management

Re: [GENERAL] Is PostgreSQL an easy choice for a large CMS?

2006-05-01 Thread Philip Hallstrom
On Sun, 2006-04-30 at 14:32, Tony Lausin wrote: [ rotfl... ] MySQL will fall over under any heavy concurrent-write scenario. It's conceivable that PG won't do what you need either, but if not I'm afraid you're going to be forced into Oracle or one of the other serious-money DBs.

Re: [GENERAL] Is PostgreSQL an easy choice for a large CMS?

2006-05-01 Thread Philip Hallstrom
That's a scary idea - being forced into Oracle or Sybase. Isn't Slashdot.org still running strongly off of MySQL? Depends on how you define strongly. Slashdot has a LOT of code in place to cache the content so it never has to hit the database directly. Basically, every X seconds, the data

Re: [GENERAL] Replication web apps

2006-03-16 Thread Philip Hallstrom
There are other techniques to balance the load of the database calls so that some go to one box and some to others, yet keep the data in synch... Continuent makes a commercial p/cluster product as well as an open source product called Sequoia that sit in the JDBC layer and direct traffic and

Re: [GENERAL] How to find first non-vacation day

2006-02-03 Thread Philip Hallstrom
I have a table of vacations create table vacation ( id integer primary key, dstart date, dend date ); I need to find first non-vacation day before given date. This can be done using the following procedural vfp code function nonvacation( dbefore ) for i=dbefore to date(1960,1,1) step -1

Re: [GENERAL] How to find first non-vacation day

2006-02-03 Thread Philip Hallstrom
I have a table of vacations create table vacation ( id integer primary key, dstart date, dend date ); I need to find first non-vacation day before given date. This can be done using the following procedural vfp code function nonvacation( dbefore ) for i=dbefore to date(1960,1,1) step -1

Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase

2005-10-11 Thread Philip Hallstrom
[ Comment asking what we can do to protect ourselves.] We can't do much, actually. The trademark thing can be secured, but other than that, I see no other defenses we could use. We can't prevent people from being hired, and we can't guard against patent attacks. Seems you could argue that if

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-07 Thread Philip Hallstrom
But no, Mark, I'm not worried by the FUD. It just means there's nothing real for them to throw at PostgreSQL. This just appeared on slashdot... MySQL To Be Ikea Of The Database Market http://developers.slashdot.org/article.pl?sid=05/10/07/1224213from=rss From the linked article...

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-06 Thread Philip Hallstrom
On Thu, Oct 06, 2005 at 10:10:14AM -0500, Scott Marlowe wrote: But what really bugs me is that some things that ARE bugs simply aren't getting fixed and probably won't. Specifically, while mysql understands fk references made at a table level, it simply ignores, without error, warning, or

Re: [GENERAL] Fetching column names for a table

2005-09-21 Thread Philip Hallstrom
I need to extract a SETOF column names for a table in plpgsql. How is this done? Start up psql with the -E option. Then type \dt tablename. This will print out the SQL that psql runs to give you the column names. Maybe that will do what you want? -philip ---(end

Re: [GENERAL] Slow search.. quite clueless

2005-09-20 Thread Philip Hallstrom
contrib/tsearch2 ( http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ ) might works for you. It might because performance depends on cardinality of your keywords. Seconded. We use tsearch2 to earch about 40,000 rows containing manufacturer, brand, and product name and it returns a

Re: [GENERAL] Postgresql Hosting

2005-09-10 Thread Philip Hallstrom
I'm sharing with 5 other small businesses a dedicated server with 60GB hard drive, 700GB monthly bandwidth on a 10Mbps link for $49/month. Where is this available? Not quite that package and I've never used them (thinking about it), but layeredtech.com has this as their cheapest: . Intel

Re: [GENERAL] Installing soundex, metaphone, lenshtein

2005-08-19 Thread Philip Hallstrom
Where can I find instructions to install these functions in my 7.4 version? I am awaret hat they are in the contrib. folder but I have never installed functions from the contrib folder. Thanks in advance. From postgresql-7.4.2/contrib/README: Each subdirectory contains a README file with

Re: [GENERAL] chosing a database name

2005-07-13 Thread Philip Hallstrom
we are developing GNUmed, a medical practice management application running on PostgreSQL (you want your medical data to be hosted by something reliable, don't you ;-) We are putting out our first release sometime in the next two weeks. The idea is to name the production database gnumed0.1 for

Re: [GENERAL] Limits of SQL

2005-06-03 Thread Philip Hallstrom
Is anybody else thinking about the limits of SQL? As often I am probably not the first to ask these questions. Any pointers? Joe Celko (sp?) has a couple of books on this subject, SQL for Smarties. I don't recall if he talks about graphs, but does discuss queries on tree relationships. I've

Re: [GENERAL] Postgres in government

2005-05-19 Thread Philip Hallstrom
...We are proposing that Postgres be used for the application database. Not too surprisingly we are being asked for additional information because Postgres is open source. So is the implication that they think open source is a bad thing? I would think they would question a recommendation for

[GENERAL] Reduce size of $PGDATA for demo cdrom?

2005-04-27 Thread Philip Hallstrom
Hi all - We've got a product built on FreeBSD and PostgreSQL 7.4.2 that I've had to fit onto an installable CDROM tradeshows and customer demos. This is the only way I've found to ensure an easy to re-install option for the non-technical folks at the tradeshows should they corrupt the box

Re: [GENERAL] restarting after power outage

2005-04-27 Thread Philip Hallstrom
It is. We have been fooling with the postmaster startup logic to try to eliminate this gotcha, but it's only very recently (8.0.2) that I think we got it right. So, then it would be correct to change my init scripts to do the following: (if so, this patch can be applied to the 7.4 branch) I

Re: [GENERAL] tsearch2

2005-04-18 Thread Philip Hallstrom
http://www.google.com/search?q=tsearch2 The first link contains info and links to what I used... worked all right for me. good luck! On Sun, 17 Apr 2005, Tobias Heise wrote: HI Everybody! Could everyone give me a short instruction how to use tsearch2, please? Tobias

Re: [GENERAL] Database monitor (again)

2005-03-31 Thread Philip Hallstrom
2. Statistics monitor (this is built in to the product): http://www.postgresql.org/docs/current/static/monitoring-stats.html Does anyone think an SNMP interface to these would be useful? I do. Would make it easy to hook it up to MRTG, Cacti, or some other monitoring system. Would be nice for

Re: [GENERAL] get certain # of recs

2001-09-14 Thread Philip Hallstrom
Take a look at the LIMIT part of the SELECT statement. in your case you'd do: select * from tablename limit 21; ALthough you'll want to use an ORDER BY otherwise you could get different results each time.. -philip On Thu, 13 Sep 2001, Mike S. Nowostawsky wrote: How can one select only a

[GENERAL] Questions about tuning on FreeBSD...

2001-09-10 Thread Philip Hallstrom
Hi all - I have some questions about tuning the various kernel parameters on FreeBSD. I've read Bruce's article a couple of times and the various parts of the documentation, but I still have some questions and was hoping people here could confirm/deny my assumptions. The machine in

[GENERAL] Re: PASSWORD() function for postgresql?

2001-07-23 Thread Philip Hallstrom
You could take the password hashing routine out of client/password.c (in the mysql source) and write your own C function... I know just enough C to think that it shouldn't be that hard, but not enough to do it :) -philip On Sun, 15 Jul 2001, Jason DiCioccio wrote: I am looking for a

[GENERAL] Re: autoincrement???

2001-07-12 Thread Philip Hallstrom
Look at the SERIAL type and the CREATE SEQUENCE documentation. -philip On Thu, 12 Jul 2001, Markus Jais wrote: hi I have the following problem: I create the following table: CREATE TABLE address ( address_id int PRIMARY KEY , street VARCHAR(40), zipcode

[GENERAL] Re: aggregate function for median calculation

2001-06-18 Thread Philip Hallstrom
I missed the first part, but if the numbers are rows in a table, why not do something like: numrows = select count(*) from table1 where some_condition median_value = select some_col from table1 where some_condition order by some_col limit numrows/2, 1 (or something very close to

[GENERAL] Re: dumping strategy

2001-05-31 Thread Philip Hallstrom
Neil Conway [EMAIL PROTECTED] writes: It's just for i in t1 t2 t3; do pg_dump -t$i mydb $i.tbl; done Although with a strategy like this, they're no guarantee that the snapshot you get will be consistent. And if you're using refential integrity it might not even restore properly.

[GENERAL] Re: bitwise again

2001-04-02 Thread Philip Hallstrom
As someone else pointed out you can upgrade to 7.1. Or you can add your own operators/functions. I've included the C source and SQL create script. You'll need to do this as the postgres superuser. And you'll probably need to edit the SQL script and adjust the path of the .so file. The .c

[GENERAL] Why is there so much MySQL bashing???

2001-01-16 Thread Philip Hallstrom
Hi all - I'm not here to start a war, but it seems to me that there is a fairly large amount of MySQL bashing in this group. Why? What's the point? It seems to me that if PostgreSQL wants an enemy to fight it should be Microsoft SQLServer and Oracle. It seems to me that it's

[GENERAL] Are triggers part of the transaction block that triggered the trigger?

2001-01-03 Thread Philip Hallstrom
Hi all - Are triggers part of the transaction block that triggered the trigger? I mean if I have a trigger that updates (an insert) a table (say for logging or whatever) and that insert fails will the original query the fired the trigger also get rolled back? I'm using 7.0.3. Thanks!

[GENERAL] Re: ERD on the cheap?

2000-12-13 Thread Philip Hallstrom
http://www.heraut.demon.nl/ I've only played with it and stopped because the SQL it generated was a little odd (but maybe I'm just not thinking straight). It's the only one I've ever found that supports mysql/postgresql though. -philip On Wed, 13 Dec 2000, Phil Glatz wrote: I putting

Re: [HACKERS] Re: [GENERAL] PHPBuilder article -- Postgres vs MySQL

2000-11-17 Thread Philip Hallstrom
On Jue 16 Nov 2000 22:54, Marko Kreen wrote: On Thu, Nov 16, 2000 at 01:33:08PM -0400, The Hermit Hacker wrote: I run PHP4 and IMP (http://www.horde.org) and we've gotten then to remove the useof pg_pconnect() since it is broken. Broken how, you might ask? Well, I ran on a

Re: [GENERAL] Re: [ANNOUNCE] [RELEASE ANNOUNCEMENT] v7.0.3 *Final*now Available

2000-11-15 Thread Philip Hallstrom
Thanks Tom! I also realized (after I sent this of course :) that I could check the md5 signatures of my tar.gz with the one on the ftp site... -philip On Tue, 14 Nov 2000, Tom Lane wrote: Philip Hallstrom [EMAIL PROTECTED] writes: I downloaded 7.0.3 from ftp.postgresql.org yesterday

[GENERAL] Re: [ANNOUNCE] [RELEASE ANNOUNCEMENT] v7.0.3 *Final* now Available

2000-11-14 Thread Philip Hallstrom
I downloaded 7.0.3 from ftp.postgresql.org yesterday (monday 14th). It didn't say anything about a pre-release... is there some way to tell if I have the final version? On Sun, 12 Nov 2000, The Hermit Hacker wrote: After a couple of pre-release tarballs, the PostgreSQL Developers are proud

Re: [GENERAL] What does this mean? NOTICE: AbortTransaction andnot in in-progress state

2000-11-13 Thread Philip Hallstrom
wrote: Philip Hallstrom [EMAIL PROTECTED] writes: NOTICE: AbortTransaction and not in in-progress state IIRC, 7.0.3 fixes some problems that could lead to that message. If you can still reproduce this with 7.0.3, it'd be interesting to turn on query logging (-d2 to postmaster) and see

[GENERAL] Increasing the number of semaphores on FreeBSD 4.1 (clarification)

2000-11-09 Thread Philip Hallstrom
Hi - I recently tried to start postmaster (7.0.2) with -B 128 -N 64 and got the "semget failed" error. Looking in the faq[1] it says I need to increase the amount allowed in the kernel. It tells me what I need to do, but my question is what values should I set them to? Is there any way

Re: [GENERAL] Increasing the number of semaphores on FreeBSD 4.1(clarification)

2000-11-09 Thread Philip Hallstrom
* Philip Hallstrom [EMAIL PROTECTED] [001109 19:12] wrote: Hi - I recently tried to start postmaster (7.0.2) with -B 128 -N 64 and got the "semget failed" error. Looking in the faq[1] it says I need to increase the amount allowed in the kernel. It tells me what I

[GENERAL] How to get postmaster to read it's new log file?

2000-11-09 Thread Philip Hallstrom
I'm starting postmaster as follows: postmaster -i -D /local/db/postgresql/data -d 2 ! /var/log/postgresql' I'd like to use newsyslog (automatically rotates logs) to keep the log file in check, but I don't know how to tell postmaster to close/re-open the log file... I'd rather not restart it

[GENERAL] Any risk in increasing BLCKSZ to get larger tuples?

2000-10-18 Thread Philip Hallstrom
Hi - I'm thinking about using postgres for an app that will store various email messages which might (although probably not likely) be larger than the builtin limit for tuples. Is there anything I should be aware of before changing the below value and recompiling? Also, it looks like

[GENERAL] Re: PSQL woes

2000-08-10 Thread Philip Hallstrom
That doesn't work for me... I get a parser error... devloki= create index foo on rolo_entry (UPPER(text(fname))); ERROR: parser: parse error at or near "(" -philip On Thu, 10 Aug 2000, Joshua Adam Ginsberg wrote: What I do is just invoke upper(text(field))... that converts the varchar to

[GENERAL] How to create an index using a function???

2000-08-09 Thread Philip Hallstrom
Hi - I have a table that has a varchar field (fname). I'd like to create an index on UPPER(fname), but am running into problems... What I don't understand is that I can do "SELECT UPPER(fname) FROM mytable" and it works just fine. I also tried creating a SQL function that did upper for

[GENERAL] Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..

2000-08-09 Thread Philip Hallstrom
Hi - The following statements lock up my machine completely (I can ping, but can't telnet, nothing). This is FreeBSD 3.4-STABLE running 7.0.2. rolo_entry.fname is of type VARCHAR(30). devloki= CREATE FUNCTION upper(VARCHAR) RETURNS TEXT AS ' devloki' BEGIN devloki' RETURN

Re: [GENERAL] Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..

2000-08-09 Thread Philip Hallstrom
ine. I just realized this after someone mentioned there was probably a recursive loop, but wouldn't that affect simple select statements as well? Oh well... I've renamed my function with a prefix which I'll probably just do all the time as it makes it easy to know what's mine and what's not. -philip

Re: [GENERAL] Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..

2000-08-09 Thread Philip Hallstrom
Yes... it is odd... especially since the following works fine: SELECT UPPER(field) FROM test; -philip On Wed, 9 Aug 2000, Lamar Owen wrote: Philip Hallstrom wrote: CREATE INDEX test_idx ON test (UPPER(field)); devloki= create index foo on rolo_entry (UPPER(fname)); ERROR

[GENERAL] Re: Lock up on 7.0.2 involving CREATE FUNCTION/INDEX..

2000-08-09 Thread Philip Hallstrom
In article [EMAIL PROTECTED], Prasanth A. Kumar [EMAIL PROTECTED] wrote: Philip Hallstrom [EMAIL PROTECTED] writes: Hi - The following statements lock up my machine completely (I can ping, but can't telnet, nothing). This is FreeBSD 3.4-STABLE running 7.0.2. rolo_entry.fname

[GENERAL] Re: Slashdot discussion

2000-07-10 Thread Philip Hallstrom
In article [EMAIL PROTECTED], Chris Bitmead [EMAIL PROTECTED] wrote: Graeme Merrall wrote: Without wanting to starta thread war I think postgres is great, but for many people the learning curve is too great and thus MySQL is a good introduction. In what way is mysql easier to learn? I think

[GENERAL] Explain auth/access/priv system??

2000-05-23 Thread Philip Hallstrom
Hi - I'm new to postgres and have some questions regarding the authentication and access systems. I've got postgres installed and can connect from remote machines, but have some questions: - I cannot connect as the postgres user 'postgres' from remote machines? Why? - How is pg_shadow