Skip site navigation (1) Skip section navigation (2)

bug in clusterdb script

From: <washingtonirving(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: bug in clusterdb script
Date: 2003-09-22 19:15:16
Message-ID: 20030922191516.12754.qmail@web41002.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Hi There's a bug in the clusterdb script where it looks like the arguments
to the psql command are being passed in the wrong order, so it fails when
you run it on a database that is not on localhost.
Here's the output from the command:

133 anands-Computer:bin/scripts> clusterdb -h wooster -U rr granada
psql: warning: extra option wooster ignored
psql: warning: extra option -U ignored
psql: warning: extra option rr ignored
psql: warning: extra option -F: ignored
psql: warning: extra option -P ignored
psql: warning: extra option format=unaligned ignored
psql: warning: extra option -t ignored
psql: warning: extra option -c ignored
psql: warning: extra option SELECT nspname, pg_class.relname,
pg_class_2.relname FROM pg_class, pg_class AS pg_class_2 JOIN pg_namespace
ON (pg_namespace.oid=relnamespace), pg_index WHERE
pg_class.oid=pg_index.indrelid AND pg_class_2.oid=pg_index.indexrelid AND
pg_index.indisclustered AND pg_class.relowner=(SELECT usesysid FROM
pg_user WHERE usename=current_user) ignored
psql: FATAL:  user "-h" does not exist



I'm attaching a patch that fixes the problem. The diff was run on
postgresql 7.3.4

Thanks a lot.
Anand Ranganathan

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Attachment: clusterdb.patch
Description: application/octet-stream (1.4 KB)

Responses

pgsql-bugs by date

Next:From: Sean ChittendenDate: 2003-09-22 19:55:07
Subject: Table alias fun == incorrectly adding tables to join...
Previous:From: E RDate: 2003-09-22 15:43:34
Subject: Re: Can't Build 7.3.4 on OS X

pgsql-patches by date

Next:From: Peter EisentrautDate: 2003-09-22 22:42:24
Subject: Re: contrib mode - pgenv
Previous:From: Andrew DunstanDate: 2003-09-22 16:49:42
Subject: Re: fix log_min_duration_statement logic error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group