Re: [GENERAL] Justifying a PG over MySQL approach to a project

2009-12-17 Thread Madison Kelly
Gauthier, Dave wrote: Hi Everyone: Tomorrow, I will need to present to a group of managers (who know nothing about DBs) why I chose to use PG over MySQL in a project, MySQL being the more popular DB choice with other engineers, and managers fearing things that are “different” (risk). I

Re: [GENERAL] Server Requirements

2009-12-17 Thread Madison Kelly
Christine Penner wrote: Hi, If we have clients that are going to buy new computers or upgrade current ones, what we can recommend to them for optimal system performance to run Postgres. These can be servers or desktop PCs. We can have from 1-10 users in at a time. At this point all of our

Re: [GENERAL] I need a Postgres Admin $130K + 20K in NYC Any Ideas?

2009-09-16 Thread Madison Kelly
Martin Gainty wrote: lets assume you never take a cab anywhere and you pack enough PBJ for a week so we dont have to argue with Ed Koch anyone that has lived in NY knows you need 2500/month for any decent studio apt Also you need first,last and security to get the apt Making false statements

Re: [GENERAL] I need a Postgres Admin $130K + 20K in NYC Any Ideas?

2009-09-16 Thread Madison Kelly
Ed Koch wrote: How are you even IN the group when nobody here agrees with you Obviously you have nothing better to do, get a Hobby Gainty Ed, please, posts like this aren't helping. We're all adults here, can we all please start acting like one? Madi -- Sent via pgsql-general

Re: [GENERAL] A history procedure that prevents duplicate entries

2009-08-16 Thread Madison Kelly
Alban Hertroys wrote: On 16 Aug 2009, at 4:24, Madison Kelly wrote: Hi all, ... CREATE FUNCTION history_radical() RETURNS trigger AS $$ DECLARE hist_radical RECORD; BEGIN SELECT INTO hist_radical * FROM public.radical WHERE rad_id=new.rad_id; I assume you

[GENERAL] A history procedure that prevents duplicate entries

2009-08-15 Thread Madison Kelly
Hi all, I've been using a procedure to make a copy of data in my public schema into a history schema on UPDATE and INSERTs. To prevent duplicate entries in the history, I have to lead in the current data, compare it in my program and then decided whether something has actually changed

[GENERAL] now() + '4d' AT TIME ZONE issue

2009-07-08 Thread Madison Kelly
Hi all, I'm trying to select an offset timestamp at a given time zone, but I can't seem to get the syntax right. What I am *trying* to do, which doesn't work: SELECT now() AT TIME ZONE 'America/Toronto', now() + '4d' AS future AT TIME ZONE 'America/Toronto'; Which

Re: [GENERAL] now() + '4d' AT TIME ZONE issue

2009-07-08 Thread Madison Kelly
Tom Lane wrote: Madison Kelly li...@alteeve.com writes: SELECT now() AT TIME ZONE 'America/Toronto', now() + '4d' AS future AT TIME ZONE 'America/Toronto'; You've got AS future in the wrong place. regards, tom lane Thank you both, Chris and Tom

[GENERAL] Return LEFT JOINed tables when one has no matching column

2009-06-24 Thread Madison Kelly
Hi all, I've got a variation on a question I asked some time ago... I've got a table that is simply a collection of variable - value columns with a pointer to another table. I use this as little as possible, given how much of a headache it is, but I've run into a situation where I need to

Re: [GENERAL] Return LEFT JOINed tables when one has no matching column

2009-06-24 Thread Madison Kelly
Harald Fuchs wrote: In article 4a425379.90...@alteeve.com, Madison Kelly li...@alteeve.com writes: SELECT a.tbl1_name, b.tbl2_date, c.tbl3_value AS some_value FROM table_1 a LEFT JOIN table_2 b ON (a.tbl1_id=b.tbl2_tbl1_id) LEFT JOIN table_3 c

Re: [GENERAL] Disaster recovery (server died)

2009-06-20 Thread Madison Kelly
Uwe C. Schroeder wrote: On Friday 19 June 2009, Scott Marlowe wrote: On Fri, Jun 19, 2009 at 8:43 PM, Miguel Mirandamiguel.miran...@gmail.com wrote: Well, i just didnt explain in detail, what i have is just the 16897 directory where i was storing the database, i tried just copying the files

Re: [GENERAL] Disaster recovery (server died)

2009-06-19 Thread Madison Kelly
Miguel Miranda wrote: Hi, the worst have ocurred, my server died (cpu), so i reinstalled another server with the same postgres version. I have the old data directory from the old server, how can i restore my databases from this directory to the new one? I dont have a backup (pg_dump,etc), just

Re: [GENERAL] Disaster recovery (server died)

2009-06-19 Thread Madison Kelly
Miguel Miranda wrote: Well, i just didnt explain in detail, what i have is just the 16897 directory where i was storing the database, i tried just copying the files but it didnt work, should it be posible to import this database is any way? the Os is Freebsd 6.2 and PG version is 8.1.3 thank

[GENERAL] Adding the host name to the PgSQL shell

2009-06-08 Thread Madison Kelly
Hi all, I work on a development and production server, and I am always double-checking myself to make sure I am doing something on the right server. Is there a way, like in terminal shells, to change the PgSQL shell's prompt from 'db=' to something like 'h...@db='? I'm on PgSQL 8.1

Re: [GENERAL] Adding the host name to the PgSQL shell

2009-06-08 Thread Madison Kelly
Scott Mead wrote: On Mon, Jun 8, 2009 at 12:44 PM, Madison Kelly li...@alteeve.com mailto:li...@alteeve.com wrote: Hi all, I work on a development and production server, and I am always double-checking myself to make sure I am doing something on the right server

Re: [GENERAL] Adding the host name to the PgSQL shell

2009-06-08 Thread Madison Kelly
Scott Mead wrote: On Mon, Jun 8, 2009 at 1:30 PM, Madison Kelly li...@alteeve.com mailto:li...@alteeve.com wrote: That works like a charm, thank you! No problem :) Next question though; How can I get it to save my custom prompt across sessions/server restarts

[GENERAL] Determining/Setting a server's time zone

2009-03-23 Thread Madison Kelly
Hi, How/Where does PostgreSQL set or determine the local time zone? On my server, I am seeing (+00): db= SELECT now(); now --- 2009-03-23 22:32:47.595491+00 (1 row) But on my workstation I am seeing (-04): db= SELECT now(); now

Re: [GENERAL] Determining/Setting a server's time zone

2009-03-23 Thread Madison Kelly
Tom Lane wrote: Madison Kelly li...@alteeve.com writes: How/Where does PostgreSQL set or determine the local time zone? Well, show timezone will tell you what PG is using. Where it came from is a bit harder to answer. The default is to use whatever zone is current according

[GENERAL] Returning null for joined tables when one column non existant

2009-02-26 Thread Madison Kelly
Hi all, I've got a query that crosses a few tables. For example: SELECT a.foo, b.bar, c.baz FROM aaa a, bbb b, ccc c WHERE a.a_id=b.b_a_id AND a.a_id=c.c_a_id AND a.a_id=1; Obviously, if there is no match in 'bbb' or 'ccc' then nothing will be returned, even if there is a

[GENERAL] Odd duplicate database

2009-01-14 Thread Madison Kelly
Hi all, My devel server has some wierdness happening. I tried to drop the database (reload from a copy from the production server) and I got this weird error: pg_dump: query returned more than one (2) pg_database entry for database nexxia So I logged in as postgres and checked, and

Re: [GENERAL] Odd duplicate database

2009-01-14 Thread Madison Kelly
Forgot to mention, this is PostgreSQL 8.3.5 on Linux (Ubuntu 8.10, hey, it's a devel machine!). :) Madi Madison Kelly wrote: Hi all, My devel server has some wierdness happening. I tried to drop the database (reload from a copy from the production server) and I got this weird error

Re: [GENERAL] Odd duplicate database

2009-01-14 Thread Madison Kelly
Alvaro Herrera wrote: Madison Kelly wrote: Forgot to mention, this is PostgreSQL 8.3.5 on Linux (Ubuntu 8.10, hey, it's a devel machine!). :) Huh. Please send along select xmin, xmax, ctid, cmin, cmax, datname from pg_database; template1=# select xmin, xmax, ctid, cmin, cmax, datname from

Re: [GENERAL] Odd duplicate database

2009-01-14 Thread Madison Kelly
Tom Lane wrote: Madison Kelly li...@alteeve.com writes: Alvaro Herrera wrote: Please send along select xmin, xmax, ctid, cmin, cmax, datname from pg_database; template1=# select xmin, xmax, ctid, cmin, cmax, datname from pg_database; xmin | xmax | ctid | cmin | cmax | datname

Re: [GENERAL] Odd duplicate database

2009-01-14 Thread Madison Kelly
Tom Lane wrote: Madison Kelly li...@alteeve.com writes: PS - If I've run into a PgSQL bug, is there anything I can provide to help? A sequence that reproduces it would be the best thing ... regards, tom lane I guess the trick is, I have no idea what's happened

[GENERAL] TIMESTAMP with a timezone offset

2008-12-16 Thread Madison Kelly
Hi all, I've got a database with a column I CAST as a TIMESTAMP. The data in the database is GMT. I want to say in my WHERE clause to offset the value I am giving by X number of hours and to display the column I've cast as a timestamp offset by the same X hours. I am sure this is

Re: [GENERAL] TIMESTAMP with a timezone offset

2008-12-16 Thread Madison Kelly
Raymond O'Donnell wrote: On 16/12/2008 19:16, Madison Kelly wrote: I want to say in my WHERE clause to offset the value I am giving by X number of hours and to display the column I've cast as a timestamp offset by the same X hours. You could use AT TIME ZONE to shift it the required number

Re: [GENERAL] SELECT DISTINCT ... ORDER BY problem

2008-12-09 Thread Madison Kelly
Grzegorz Jaśkiewicz wrote: On Mon, Dec 8, 2008 at 10:19 PM, Madison Kelly [EMAIL PROTECTED] wrote: Hi all, I've got a table that I am trying to SELECT DISTINCT on one column and ORDER BY on a second column, but am getting the error: SELECT DISTINCT ON expressions must match initial ORDER

Re: [GENERAL] SELECT DISTINCT ... ORDER BY problem

2008-12-09 Thread Madison Kelly
Grzegorz Jaśkiewicz wrote: On Tue, Dec 9, 2008 at 9:02 AM, Grzegorz Jaśkiewicz [EMAIL PROTECTED] wrote: or even, when you change bar to proper type - that is, timestamp SELECT distinct foo, min(bar) as minbar, max(bar) as maxbar FROM table WHERE bar '2008-12-07 16:32:46' AND tbl_id=153

[GENERAL] SELECT DISTINCT ... ORDER BY problem

2008-12-08 Thread Madison Kelly
Hi all, I've got a table that I am trying to SELECT DISTINCT on one column and ORDER BY on a second column, but am getting the error: SELECT DISTINCT ON expressions must match initial ORDER BY expressions I can't add the second column to the DISTINCT clause because every row is unique.

Re: [GENERAL] SELECT DISTINCT ... ORDER BY problem

2008-12-08 Thread Madison Kelly
David Rowley wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Madison Kelly Sent: 08 December 2008 22:19 To: pgsql-general@postgresql.org Subject: [GENERAL] SELECT DISTINCT ... ORDER BY problem Hi all, I've got a table that I am

Re: [GENERAL] SELECT DISTINCT ... ORDER BY problem

2008-12-08 Thread Madison Kelly
David Fetter wrote: On Mon, Dec 08, 2008 at 11:16:29PM -, David Rowley wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Madison Kelly Sent: 08 December 2008 22:19 To: pgsql-general@postgresql.org Subject: [GENERAL] SELECT

Re: [GENERAL] rollback

2008-07-09 Thread Madison Kelly
Adrian Moisey wrote: Hi I would like to be able to mark a point in my postgres database. After that I want to change a few things and rollback to that point. Does postgres support such a thing? Is it possible for me to do this? A crude way of doing it, which I've done in the past on test

[GENERAL] Moving lock file (/tmp/.s.PGSQL.port)

2007-11-30 Thread Madison Kelly
Hi all, If there a ./configure switch (or config file/command line switch) to tell postgresql to put the lock file '.s.PGSQL.port.lock' and socket '.s.PGSQL.port' in a different directory? Thanks all! Madi ---(end of broadcast)--- TIP 9: In

[GENERAL] ALTER syntax question and usernames with hyphens

2007-11-26 Thread Madison Kelly
Hi all, What is the proper syntax/escape character when using 'ALTER ... OWNER TO user-name'? I've tried single quotes, backslashes, backticks and various others without luck. Is it at all possible? Thanks! Madi ---(end of broadcast)--- TIP

[GENERAL] PostgreSQL 8.2.5 compile problem

2007-11-15 Thread Madison Kelly
Hi all, I am trying to compile PgSQL 8.2.5 (on Debian Etch, in case it matters). This is a second install for a dedicated program, which is why I am not using the binaries in the apt repositories. My problem is, 'make' is failing with: previous stuff snipped make -C pl install make[2]:

Re: [GENERAL] PostgreSQL 8.2.5 compile problem

2007-11-15 Thread Madison Kelly
Tom Lane wrote: Madison Kelly [EMAIL PROTECTED] writes: gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fpic -shared -Wl,-soname,libplperl.so.0 plperl.o spi_internal.o SPI.o -L/usr/local/lib -L/usr/lib/perl/5.8

[GENERAL] Small dedicated install of PgSQL for a program

2007-11-02 Thread Madison Kelly
Hey all, I've got a program that uses PostgreSQL. In the past, one of the trickier parts of installation and design was supporting various versions and various types of SQL servers. So now that I am doing a ground-up rewrite of the program, I wanted to use a dedicated installation of

Re: [GENERAL] subquery/alias question

2007-09-26 Thread Madison Kelly
Michael Glaesemann wrote: On Sep 25, 2007, at 17:30 , Alvaro Herrera wrote: Michael Glaesemann wrote: select dom_id, dom_name, usr_count from domains natural join (select usr_dom_id as dom_id, count(usr_dom_id) as usr_count from

[GENERAL] Solved! Was: (subquery/alias question)

2007-09-26 Thread Madison Kelly
Alvaro Herrera wrote: Madison Kelly wrote: Thanks for your reply! Unfortunately, in both cases I get the error: nmc= SELECT dom_id, dom_name, COUNT(usr_dom_id) AS usr_count FROM domains JOIN users ON (usr_dom_id=dom_id) HAVING COUNT (usr_dom_id) 0 ORDER BY dom_name; ERROR: syntax

Re: [GENERAL] subquery/alias question

2007-09-26 Thread Madison Kelly
Gregory Stark wrote: Madison Kelly [EMAIL PROTECTED] writes: SELECT d.dom_id, d.dom_name FROM domains d WHERE (SELECT COUNT(*) FROM users u WHERE u.usr_dom_id=d.dom_id) 0 ORDER BY d.dom_name ASC; Which gives me just the domains with at least one user under them, but not the count

Re: [GENERAL] Manually clearing database foo is being accessed by other users

2007-09-25 Thread Madison Kelly
Steve Crawford wrote: Sysadmin wrote: Hi all, I'm finding that routinely when I try to reload a database on a server where I know there are no connections to a given DB I get the error: $ dropdb foo createdb foo -O bar psql foo -f /path/to/db.out dropdb: database removal failed: ERROR:

[GENERAL] subquery/alias question

2007-09-25 Thread Madison Kelly
Hi all, I've read 7.2.1.3 (as short as it is) in the PgSQL docs, but don't see what I am doing wrong... Maybe you can help? I've got a query; SELECT d.dom_id, d.dom_name, (SELECT COUNT(*) FROM users u WHERE u.usr_dom_id=d.dom_id) AS usr_count FROM

[GENERAL] Return t/f on existence of a join

2007-09-21 Thread Madison Kelly
... Or something like that. :) Sorry for so many questions! I have another how do I create this query? question, if it's okay. I've got three tables; 'foo', 'bar' and 'baz'. In 'foo' I've got 'foo_id' which is a PK. I've also got a bunch of other info, but in essence this is the parent

[GENERAL] Solved! Was (Return t/f on existence of a join)

2007-09-21 Thread Madison Kelly
Thanks to both of you, Erik and Jon! I had to tweak your two replies to get what I wanted (all 'foo' rows returned, was only getting ones with a match in 'baz'). You two sent me on the right path though and I was able to work out the rest using the PgSQL docs on 'CASE' and 'JOIN'. Here

[GENERAL] Wait, not solved... Was (Return t/f on existence of a join)

2007-09-21 Thread Madison Kelly
Madison Kelly wrote: Thanks to both of you, Erik and Jon! I had to tweak your two replies to get what I wanted (all 'foo' rows returned, was only getting ones with a match in 'baz'). You two sent me on the right path though and I was able to work out the rest using the PgSQL docs on 'CASE

[GENERAL] Actually Solved! Was: (Return t/f on existence of a join)

2007-09-21 Thread Madison Kelly
Madison Kelly wrote: It's returning a row from 'foo' for every entry in baz that has an entry pointing to foo (possibly same problem with each pointer to an entry in bar, not sure yet). The 'true/false' part is working though... Back to reading. *sigh* :) Madi I'm sorry for all the line

[GENERAL] SELECT question (splitting a field)

2007-09-04 Thread Madison Kelly
Hi all, Hopefully a quick question... Why does: nmc= SELECT 'Y' AS local FROM domains WHERE dom_name='test.com'; local --- Y (1 row) Work but: nmc= SELECT 'Y' AS local FROM domains WHERE '@'||dom_name IN ('[EMAIL PROTECTED]'); local --- (0 rows) Not work? I am sure I

Re: [GENERAL] SELECT question (splitting a field)

2007-09-04 Thread Madison Kelly
Rodrigo De León wrote: On 9/4/07, Madison Kelly [EMAIL PROTECTED] wrote: I am sure I am missing something simple. :) Yeah... '[EMAIL PROTECTED]' '@test.com' Well now, don't I feel silly. *sigh* Thanks! Madi ---(end of broadcast)--- TIP

Re: [GENERAL] SELECT question (splitting a field)

2007-09-04 Thread Madison Kelly
Richard Huxton wrote: Madison Kelly wrote: nmc= SELECT 'Y' AS local FROM domains WHERE '@'||dom_name IN ('[EMAIL PROTECTED]'); local --- (0 rows) Not work? I don't think IN does what you think it does. It's not a substring-test, but a set test: SELECT 1 WHERE 'x' IN ('a','b','c

Re: [GENERAL] Select question

2007-08-31 Thread Madison Kelly
Merlin Moncure wrote: I seem to recall giving out a query about that in the IRC channel a while back...so if you got it from me, now I'll attempt to finish the job :-). If you can get postfix to look at a view, maybe you could CREATE VIEW email_v AS SELECT usr_email, dom_name,

[GENERAL] Select question

2007-08-30 Thread Madison Kelly
Hi all, I am pretty sure I've done this before, but I am drawing a blank on how I did it or even what commands I need. Missing the later makes it hard to search. :P I've got Postfix working using PostgreSQL as the backend on a small, simple test database where I have a simple table

Re: [GENERAL] Select question

2007-08-30 Thread Madison Kelly
Woops, I wasn't careful enough when I wrote that email, sorry. The results showed my real domains instead of 'test.com'. I had different domains in the test and real DBs. Madison Kelly wrote: email_file - feneon.com/mkelly/inbox and email_file

Solved! Was: Re: [GENERAL] Select question

2007-08-30 Thread Madison Kelly
Madison Kelly wrote: Hi all, I am pretty sure I've done this before, but I am drawing a blank on how I did it or even what commands I need. Missing the later makes it hard to search. :P I've got Postfix working using PostgreSQL as the backend on a small, simple test database where I

[GENERAL] OT? Courier + PgSQL problem

2007-08-28 Thread Madison Kelly
? ---+--+--+--+--+--+---+--+---+-- [EMAIL PROTECTED] | | foo | 1001 | 1001 | /email | feneon.com/mkelly | | Madison Kelly | The important columns are: ?column? | ?column

[GENERAL] Help creating a function

2007-08-17 Thread Madison Kelly
Hi all, I'm using ulogd with PostgreSQL which stores IP addresses as 32bit unsigned integers. So when I select some data I get something like: ulogd= SELECT id, ip_saddr, ip_daddr, raw_pktlen, ip_totlen, tcp_window FROM ulog LIMIT 20; id | ip_saddr | ip_daddr | raw_pktlen | ip_totlen

[GENERAL] Help creating a function

2007-08-17 Thread Madison Kelly
Note: This is being sent again (in case it shows up later). It never seemed to have made it to the list. Hi all, I'm using ulogd with PostgreSQL which stores IP addresses as 32bit unsigned integers. So when I select some data I get something like: ulogd= SELECT id, ip_saddr, ip_daddr,

Re: [GENERAL] Linux distro

2007-08-02 Thread Madison Kelly
Ron Johnson wrote: Pardon me for being the contrarian, but why does a server need a GUI? Isn't that just extra RAM CPU overhead that could be more profitably put to use powering the application? What I do is install Gnome, just in case I need it for some reason (ie: opening many terminal

Re: [GENERAL] Linux distro

2007-08-01 Thread Madison Kelly
[EMAIL PROTECTED] wrote: Hello, I bought a Dell server and I am going to use it for installing PostgrSQL 8.2.4. I always used Windows so far and I would like now to install a Linux distribution on the new server. Any suggestion on which distribution ? Fedora, Ubuntu server, Suse or others?

Re: [GENERAL] Linux distro

2007-08-01 Thread Madison Kelly
Joseph S wrote: I just moved one of my desktops and my laptop from Fedora 6 to Unbuntu 7.04 because Fedora lacked hardware support that Unbuntu and my Fedora machines had all sorts of problems like sound dropping out and machines locking up. (Also the Fedora installers are terrible). My

[GENERAL] encrypting a query string

2007-07-16 Thread Madison Kelly
Hi all, Is it possible to take a string (ie: a user's password) and have postgres encrypt the string before performing the query? At the moment, I am using postgresql + postfix for email. I need to save the passwords in clear text in the DB and I don't feel safe doing that. I'd like to

[GENERAL] Moved postgres, now won't start

2007-07-16 Thread Madison Kelly
Hi all, I've created a small 2-node (Debian Etch, PgSQL8.1) cluster using a (shared) DRBD8 partition formatted as ext3 running in Primary/Secondary mode. I shut down postgresql-8.1, moved '/etc/postgresql' and '/etc/postgres-commin' to '/ha/etc' (where '/ha' is the DRBD partitions

Re: [GENERAL] Moved postgres, now won't start

2007-07-16 Thread Madison Kelly
Tom Lane wrote: I think that's the first actual file access that happens during the connect sequence (everything before that is done with in-memory caches in the postmaster). So what I'm wondering is whether you *really* shut down and restarted the postmaster, or whether you are trying to

Re: [GENERAL] Moved postgres, now won't start

2007-07-16 Thread Madison Kelly
Zoltan Boszormenyi wrote: Do you use SELinux? Look for avc denied messages in the logs to see if it's the case. No, I don't (unless I missed it and Debian Etch uses it by default now). To be sure, I checked the log files and only say this: 2007-07-16 13:58:03 EDT LOG: incomplete startup

Re: [GENERAL] Moved postgres, now won't start

2007-07-16 Thread Madison Kelly
Tom Lane wrote: Madison Kelly [EMAIL PROTECTED] writes: I've created a small 2-node (Debian Etch, PgSQL8.1) cluster using a (shared) DRBD8 partition formatted as ext3 running in Primary/Secondary mode. I shut down postgresql-8.1, moved '/etc/postgresql' and '/etc/postgres-commin

[GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Madison Kelly
Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv. of: SELECT

Re: [GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Madison Kelly
Madison Kelly wrote: Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv. of: SELECT CONCAT(SUBSTRING_INDEX(usr_email

Re: [GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-13 Thread Madison Kelly
Steve Atkins wrote: On Jul 13, 2007, at 6:39 PM, Madison Kelly wrote: Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL equiv

Re: [GENERAL] High-availability

2007-06-04 Thread Madison Kelly
Chander Ganesan wrote: Madison Kelly wrote: Hi all, After realizing that 'clustering' in the PgSQL docs means multiple DBs behind one server, and NOT multple machines, I am back at square one, feeling somewhat the fool. :P Can anyone point me to docs/websites that discuss options

Re: [GENERAL] High-availability

2007-06-03 Thread Madison Kelly
Lew wrote: Madison Kelly wrote: Being a quite small company, proprietary hardware and fancy software licenses are not possible (ie: 'use oracle' won't help). How much data do you put in the DB? Oracle has a free version, but it has size limits. (Ducking the slings and arrows of outraged

Re: [GENERAL] High-availability

2007-06-02 Thread Madison Kelly
Alexander Staubo wrote: On 6/1/07, Madison Kelly [EMAIL PROTECTED] wrote: After realizing that 'clustering' in the PgSQL docs means multiple DBs behind one server, and NOT multple machines, I am back at square one, feeling somewhat the fool. :P I remember being similarly disappointed

[GENERAL] High-availability

2007-06-01 Thread Madison Kelly
Hi all, After realizing that 'clustering' in the PgSQL docs means multiple DBs behind one server, and NOT multple machines, I am back at square one, feeling somewhat the fool. :P Can anyone point me to docs/websites that discuss options on replicating in (as close as possible to)

Re: [GENERAL] Query help

2007-03-08 Thread Madison Kelly
Richard Huxton wrote: Madison Kelly wrote: Hi all, I've got a query that looks through a table I use for my little search engine. It's something of a reverse-index but not quite, where a proper reverse index would have 'word | doc1, doc3, doc4, doc7' showing all the docs the keyword

[GENERAL] Query help

2007-03-07 Thread Madison Kelly
Hi all, I've got a query that looks through a table I use for my little search engine. It's something of a reverse-index but not quite, where a proper reverse index would have 'word | doc1, doc3, doc4, doc7' showing all the docs the keyword is in, mine has an entry for eac I've got a

Re: [GENERAL] Possibly odd question; diff results?

2007-02-09 Thread Madison Kelly
Merlin Moncure wrote: On 2/8/07, Madison Kelly [EMAIL PROTECTED] wrote: Hi all, I've got a 'history' schema that records changes in the public schema tables over time. I use a trigger and function to do this. What I would like to do though, and this may not even be possible, is say

[GENERAL] Possibly odd question; diff results?

2007-02-08 Thread Madison Kelly
Hi all, I've got a 'history' schema that records changes in the public schema tables over time. I use a trigger and function to do this. What I would like to do though, and this may not even be possible, is say something like (pseudo-code) SELECT DIFF foo_name FROM history.foo WHERE foo_id=X;

Re: [GENERAL] How I can read-back a serial value just inserted?

2007-01-17 Thread Madison Kelly
dfx wrote: Dear Sirs, my question is very simple: when I insert a row whith a serial field, a value is automatically generated; how can I know this value, strictly of my row, without the risk of to read the value of another subsequent insertion? Thank you. Domenico Hiya, Not sure if it

[GENERAL] pg_dump question

2007-01-04 Thread Madison Kelly
Hi all, I've created a database (pgsql 8.1 on Debian Etch) that uses triggers/functions to keep all changes for various tables in a history schema. This is the first time I've done this (captured and stored changes in a different schema) so I was hoping for some backup/restore advice.

Re: [GENERAL] pg_dump question

2007-01-04 Thread Madison Kelly
Richard Huxton wrote: As far as I can tell, you can only dump one schema at a time. Is this true? No, pg_dump dumps a whole database by default. You can dump just a single schema or table though. Hmm, I wonder why I thought this... Was this true in older versions or did I just imagine

Re: [GENERAL] MySQL drops support for most distributions

2006-12-13 Thread Madison Kelly
David Goodenough wrote: http://developers.slashdot.org/article.pl?sid=06/12/13/1515217from=rss MySQL quietly deprecated support for most Linux distributions on October 16, when its 'MySQL Network' support plan was replaced by 'MySQL Enterprise.' MySQL now supports only two Linux distributions

Re: [GENERAL] Male/female

2006-12-08 Thread Madison Kelly
Jorge Godoy wrote: Joshua D. Drake [EMAIL PROTECTED] writes: Yes, but further I don't know of any country that recognizes anything but Male or Female. I haven't read the beginning of the thread, but will this table be used only for humans? There are animals that are hermafrodites (I hope I

Re: [GENERAL] Is there a PostgreSQL utility that is similiar to Oracles

2006-11-17 Thread Madison Kelly
Wm.A.Stafford wrote: We are trying to load our PostgreSQL DB with data that contains many corrupted rows. I recall that sql loader will skip corrupted rows and keep going. We are using the PostgreSQL copy command to load and it just gives up when the first corrupted row is encountered.

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Madison Kelly
AgentM wrote: Alvaro's advice is sound. If the patent holder can prove that a developer looked at a patent (for example, from an email in a mailing list archive) and the project proceeded with the implementation regardless, malice can been shown and damages can be substantially higher. You're

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Madison Kelly
Brian Mathis wrote: I also am NAL, but I know enough about the patent system (in the US) to know that ignorance *IS* a defense. If you are ignorant of the patent, you only have to pay the damages. If you knew about the patent and did it anyway, you have to pay *triple* damages. Ignorance

Re: [GENERAL] A query planner that learns

2006-10-17 Thread Madison Kelly
Alvaro Herrera wrote: Yeah. I invite you to do all the extra (useless) development work required. But please do not charge other people with it. Whoever investigates patents and lets pgsql-hackers know about them, is charging the Postgres community with that work. We sure don't need it. As

Re: [GENERAL] A query planner that learns

2006-10-16 Thread Madison Kelly
Alvaro Herrera wrote: Jochem van Dieten wrote: Scott Marlowe wrote: While all the talk of a hinting system over in hackers and perform is good, and I have a few queries that could live with a simple hint system pop up now and again, I keep thinking that a query planner that learns from its

Re: [GENERAL] A query planner that learns

2006-10-16 Thread Madison Kelly
Alvaro Herrera wrote: Hasn't IBM release a pile of it's patents for use (or at least stated they won't sue) to OSS projects? If so, is this patent covered by that amnesty? This is useless as a policy, because we have plenty of companies basing their proprietary code on PostgreSQL, which

Re: [GENERAL] invalid data in PID file

2006-10-11 Thread Madison Kelly
Tom Lane wrote: J S B [EMAIL PROTECTED] writes: FATAL: could not open lock file /tmp/.s.PGSQL.5432.lock: Permission denied Can you please tell me what is this all about? It looks to me like you have, or had, another postmaster running under a different userid. Perhaps you should back up

[GENERAL] Determining size of a database before dumping

2006-10-02 Thread Madison Kelly
Hi all, I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed by a 'pg_dump' run *before* actually dumping it. Is there a relatively

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Madison Kelly
Steve Wampler wrote: Madison Kelly wrote: Hi all, I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed by a 'pg_dump' run *before

Re: [GENERAL] Determining size of a database before dumping

2006-10-02 Thread Madison Kelly
Alexander Staubo wrote: On Oct 2, 2006, at 22:17 , Madison Kelly wrote: I am (re)writing a backup program and I want to add a section for backing up pSQL DBs. In the planning steps (making sure a given destination has enough space) I try to calculate how much space will be needed

[GENERAL] Logging queries

2006-02-02 Thread Madison Kelly
-- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Madison Kelly (Digimer) TLE-BU; The Linux Experience, Back Up Main Project Page: http://tle-bu.org Community Forum:http://forum.tle-bu.org -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ---(end of broadcast)--- TIP 3: Have you checked our

Re: [GENERAL] Logging queries

2006-02-02 Thread Madison Kelly
Madison Kelly wrote: Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am hoping to help fix

Solved: Re: [GENERAL] Logging queries

2006-02-02 Thread Madison Kelly
Madison Kelly wrote: Madison Kelly wrote: Hi all, I've got a machine I am setting up (read; low volume atm). I need a way to log all the queries made to Postgres (just for a short time). I've got a problem with a 3rd party program (OSS, but I'm not 'let' enough to trace it) and I am

Re: [GENERAL] Ident authentication failed

2006-01-02 Thread Madison Kelly
but the PostgreSQL docs do a better job at explaining it than I can. HTH! Madison -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Madison Kelly (Digimer) TLE-BU; The Linux Experience, Back Up Main Project Page: http://tle-bu.org Community Forum:http://forum.tle-bu.org

Re: [GENERAL] Check If PostgreSQL Table Exists

2006-01-01 Thread Madison Kelly
[EMAIL PROTECTED] wrote: Dear All, How To Check If PostgreSQL Table Exists in the Database Using Perl. Dhilchrist Here is what I do... $DBreq=$DB-prepare(SELECT COUNT(*) FROM pg_tables WHERE tablename='foo') || die $DBI::errstr; $DBreq-execute(); my ($table_num)=$DBreq-fetchrow_array(); if

[GENERAL] Getting a DB password to work without editing pg_hba.conf, possible?

2005-12-16 Thread Madison Kelly
I try connecting as another user I get in without being prompted for a password at all. Any help with this would be much appreciated! Madison -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Madison Kelly (Digimer) TLE-BU; The Linux Experience, Back Up Main Project Page: http

Re: [GENERAL] Getting a DB password to work without editing pg_hba.conf,

2005-12-16 Thread Madison Kelly
Tom Lane wrote: Madison Kelly [EMAIL PROTECTED] writes: I want to find a way to let the user set the password on the new database and have postgres actually ask for it without editing the default 'pg_hba.conf' file, if at all possible. There is no such animal as a database password in PG

Re: [GENERAL] Getting a DB password to work without editing pg_hba.conf,

2005-12-16 Thread Madison Kelly
Martijn van Oosterhout wrote: On Fri, Dec 16, 2005 at 02:09:52PM -0500, Madison Kelly wrote: May I ask then? What *is* considered best practices for securing a database in PostgreSQL? Assuming I leave the 'pg_hba.conf' file at it's default values, is there any real point to having a password

Re: [GENERAL] Getting a DB password to work without editing pg_hba.conf,

2005-12-16 Thread Madison Kelly
Tom Lane wrote: Madison Kelly [EMAIL PROTECTED] writes: May I ask then? What *is* considered best practices for securing a database in PostgreSQL? Assuming I leave the 'pg_hba.conf' file at it's default values, is there any real point to having a password on a postgresql user account

Re: [GENERAL] Getting a DB password to work without editing pg_hba.conf,

2005-12-16 Thread Madison Kelly
Tom Lane wrote: Madison Kelly [EMAIL PROTECTED] writes: Oh shoot, I really wasn't very verbose, was I? Sorry about that. [ default pg_hba.conf with only ident lines ] Ah, that explains your question about whether passwords were good for anything at all. With this pg_hba.conf they aren't

  1   2   >