Re: [GENERAL] best way to query

2008-01-25 Thread Steve Clark
Tom Lane wrote: Steve Clark [EMAIL PROTECTED] writes: explain shows: Aggregate (cost=4712921585.30..4712921585.31 rows=1 width=0) - Seq Scan on t_event_ack_log a (cost=103170.29..4712920878.60 rows=282677 width=0) Filter: (NOT (subplan)) SubPlan

Re: [GENERAL] best way to query

2008-01-25 Thread Steve Clark
Daniel Verite wrote: Steve Clark wrote: any way i have 2 table - A and B. each table has a key field and if a row is in B it should have a corresponding row in A - but theres the problem it doesn't for all the rows in B. So I want to do something like delete from B where key

[GENERAL] best way to query

2008-01-25 Thread Steve Clark
Hello List, this is a noobie question: I have had to take over an existing system - it was supposed to have some contraints that prevented dangling references - but... any way i have 2 table - A and B. each table has a key field and if a row is in B it should have a corresponding row in A -

Re: [GENERAL] best way to query

2008-01-25 Thread Steve Clark
Tom Lane wrote: Steve Clark [EMAIL PROTECTED] writes: Tom Lane wrote: Also, whatever is the ORDER BY for? without the order by it wants to do a seq scan of t_unit_event_log. see below: explain select count(*) from t_event_ack_log where event_log_no not in (select event_log_no from

Re: [GENERAL] pg_dumpall

2008-01-18 Thread Steve Clark
Erik Jones wrote: On Jan 17, 2008, at 1:08 PM, Greg Smith wrote: On Thu, 17 Jan 2008, Tom Lane wrote: There isn't any good way to guarantee time coherence of dumps across two databases. Whether there's a good way depends on what you're already doing. If you're going to the trouble of

Re: [GENERAL] 7.4.6 to 8.2.5 - ' changes to $_$

2008-01-18 Thread Steve Clark
Bricklen Anderson wrote: Steve Clark wrote: function from 7.4.x postgres CREATE FUNCTION update_dns(text, text) RETURNS integer AS 'UPDATE domain_details SET domain = $2 WHERE domain = $1; DELETE from domains where domain = $1; SELECT 1 AS ignore;' LANGUAGE sql; I load

[GENERAL] 7.4.6 to 8.2.5 - ' changes to $_$

2008-01-18 Thread Steve Clark
function from 7.4.x postgres CREATE FUNCTION update_dns(text, text) RETURNS integer AS 'UPDATE domain_details SET domain = $2 WHERE domain = $1; DELETE from domains where domain = $1; SELECT 1 AS ignore;' LANGUAGE sql; I load it into 8.2.5 - then dump it out and it is

[GENERAL] losing db user password going from 7.4 to 8.2

2008-01-17 Thread Steve Clark
Hello List, I am doing a pg_dumpall -c on 7.4. I then use psql to load into 8.2 everything seems to be right except my db user passwords don't work anymore. What am I missing. I have already tried starting 8.2 postgres with both #password_encryption = on password_encryption = off then

[GENERAL] pg_dumpall

2008-01-17 Thread Steve Clark
Hello List, the man page for pg_dump say: pg_dump is a utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently. does pg_dumpall make consistent backups if the database is being used concurrently? Even though

Re: [GENERAL] losing db user password going from 7.4 to 8.2

2008-01-17 Thread Steve Clark
Scott Marlowe wrote: On Jan 17, 2008 10:35 AM, Steve Clark [EMAIL PROTECTED] wrote: Hello List, I am doing a pg_dumpall -c on 7.4. I then use psql to load into 8.2 everything seems to be right except my db user passwords don't work anymore. What am I missing. What error message are you

<    1   2