Re: [GENERAL] Password as a command line argument to createuser

2007-12-18 Thread Greg Smith
On Wed, 19 Dec 2007, A. Kretschmer wrote: psql -U ... database -c "create user foo password 'secret';" This seems like a reasonable example, but it will also show the password you're assigning on the command line to anybody who happens to run ps, which is the reason why this isn't allowed by

Re: [GENERAL] Password as a command line argument to createuser

2007-12-18 Thread A. Kretschmer
am Tue, dem 18.12.2007, um 22:04:13 -0800 mailte Jane Ren folgendes: > Hi, > > I need to write a script that creates a new user with a password > automatically. > > Is there a way I can specify the password as a command line argument to > createuser? >From a unix shell? You can call psql with -

Re: [GENERAL] Password as a command line argument to createuser

2007-12-18 Thread Tom Lane
"Jane Ren" <[EMAIL PROTECTED]> writes: > Is there a way I can specify the password as a command line argument to > createuser? No, and it would be a really bad idea if you could, as the password would be exposed to everyone else on the machine (via "ps") while createuser runs. There are various w

Re: [GENERAL] Password as a command line argument to createuser

2007-12-18 Thread Joshua D. Drake
Jane Ren wrote: Hi, I need to write a script that creates a new user with a password automatically. Is there a way I can specify the password as a command line argument to createuser? Since you have access to the shell use psql -U user -c "create role ..." Joshua D. Drake It looks like po

[GENERAL] Password as a command line argument to createuser

2007-12-18 Thread Jane Ren
Hi, I need to write a script that creates a new user with a password automatically. Is there a way I can specify the password as a command line argument to createuser? It looks like postgres does not read from stdin, but from /dev/tty. Thanks ---(end of broadcast)--

[GENERAL] foreign key constraint, planner ignore index.

2007-12-18 Thread Andrew Nesheret
Greetings, List. Environment: Linux, (PostgreSQL) 8.3beta4 or (PostgreSQL) 8.2.4, same results. Billing database with two tables. 1. Small table with nodes (23 rows) inms=> \d nodes Table "public.nodes" Column| Type |

Re: [GENERAL] thank you

2007-12-18 Thread Colin Wetherbee
Gregory Williamson wrote: Kevin H. wrote on Tue 12/18/2007 7:26 PM > Hullo List, > > This is aimed at everyone in this community who contributes to the > Postgres project, but especially at the core folks who continually make > this community great through energy, time, money, responses, an

Re: [GENERAL] thank you

2007-12-18 Thread brian
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 19 Dec 2007 12:20:32 +0900 Paul Lambert <[EMAIL PROTECTED]> wrote: That is until I can convince my new employer to realise the dark side of Microsoft SQL Server. :) 503-667-4564 extension 101... I am available anyt

Re: [GENERAL] thank you

2007-12-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 19 Dec 2007 12:20:32 +0900 Paul Lambert <[EMAIL PROTECTED]> wrote: > I'm just disappointed that I finish up work with my current employer > on Friday and where I am going I won't get to work with PG anymore > and thus won't have as much opport

Re: [GENERAL] thank you

2007-12-18 Thread Erik Jones
On Dec 18, 2007, at 8:26 PM, Kevin Hunter wrote: Hullo List, This is aimed at everyone in this community who contributes to the Postgres project, but especially at the core folks who continually make this community great through energy, time, money, responses, and what-have-you. I see lots

Re: [GENERAL] thank you

2007-12-18 Thread Ow Mun Heng
On Tue, 2007-12-18 at 20:12 -0700, Gregory Williamson wrote: > Kevin H. wrote on Tue 12/18/2007 7:26 PM > > This is aimed at everyone in this community who contributes to the > > Postgres project, but especially at the core folks who continually > make this community great through energy, time, mo

Re: [GENERAL] thank you

2007-12-18 Thread Paul Lambert
Gregory Williamson wrote: Kevin H. wrote on Tue 12/18/2007 7:26 PM > Hullo List, > > This is aimed at everyone in this community who contributes to the > Postgres project, but especially at the core folks who continually make > this community great through energy, time, money, responses, an

Re: [GENERAL] thank you

2007-12-18 Thread Gregory Williamson
Kevin H. wrote on Tue 12/18/2007 7:26 PM > Hullo List, > > This is aimed at everyone in this community who contributes to the > Postgres project, but especially at the core folks who continually make > this community great through energy, time, money, responses, and > what-have-you. <...snipped.

Re: [GENERAL] thank you

2007-12-18 Thread Martin Gainty
2 questions NDA...what NDA?? I would suggest concentrating on implementing your contact page (in other words publish the page only when it works correctly..) M-- - Original Message - From: "Kevin Kempter" <[EMAIL PROTECTED]> To: Sent: Tuesday, December 18, 2007 9:31 PM Subject: Re: [GEN

Re: [GENERAL] thank you

2007-12-18 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 18 Dec 2007 19:31:57 -0700 Kevin Kempter <[EMAIL PROTECTED]> wrote: > > The point is that I hope you realize just how much you all mean to > > the community. > > > > Kevin > > > I'll second that. Plus thank you for a database system that's a

Re: [GENERAL] thank you

2007-12-18 Thread Kevin Kempter
On Tuesday 18 December 2007 19:26:40 Kevin Hunter wrote: > Hullo List, > > This is aimed at everyone in this community who contributes to the > Postgres project, but especially at the core folks who continually make > this community great through energy, time, money, responses, and > what-have-you.

[GENERAL] thank you

2007-12-18 Thread Kevin Hunter
Hullo List, This is aimed at everyone in this community who contributes to the Postgres project, but especially at the core folks who continually make this community great through energy, time, money, responses, and what-have-you. I see lots of "Thank you"s go by for this problem or that conundru

Re: [GENERAL] Way to avoid expensive Recheck Cond in index lookup?

2007-12-18 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > "Matt Magoffin" <[EMAIL PROTECTED]> writes: >> The problem for me is, the Recheck Cond is then on the xpath() function >> used by the function-based index. My understanding is that then the >> database must actually call the xpath() function again on all ma

Re: [GENERAL] Way to avoid expensive Recheck Cond in index lookup?

2007-12-18 Thread Matt Magoffin
>> The problem for me is, the Recheck Cond is then on the xpath() function >> used by the function-based index. My understanding is that then the >> database must actually call the xpath() function again on all matches >> from >> the index lookup. > > This is mistaken. It only happens if there are

Re: [GENERAL] Way to avoid expensive Recheck Cond in index lookup?

2007-12-18 Thread Tom Lane
"Matt Magoffin" <[EMAIL PROTECTED]> writes: > The problem for me is, the Recheck Cond is then on the xpath() function > used by the function-based index. My understanding is that then the > database must actually call the xpath() function again on all matches from > the index lookup. This is mista

[GENERAL] Way to avoid expensive Recheck Cond in index lookup?

2007-12-18 Thread Matt Magoffin
Hello, I'm trying to find a way to use a text[] index lookup using an xpath() function in 8.3, but I suspect this situation is not specific to 8.3 or this exact query style. The query plan looks like Bitmap Heap Scan on lead (cost=37.39..7365.22 rows=2206 width=8) Recheck Cond: ((xpath('/als:

Re: [GENERAL] combining semi-duplicate rows

2007-12-18 Thread Tom Lane
"hjenkins" <[EMAIL PROTECTED]> writes: > So I tried: > UPDATE schema1.datatable SET schema1.datatable.field1 = > schema2.datatable.field1 FROM schema2.datatable > WHERE schema2.datatable.keyfield = schema1.datatable.keyfield > AND schema1.datatable.field1 = None; > Which is suboptimal because I'd

Re: [GENERAL] logging arguments to prepared statements?

2007-12-18 Thread Merlin Moncure
On Dec 18, 2007 12:14 PM, rihad <[EMAIL PROTECTED]> wrote: > Ted Byers wrote: > > --- rihad <[EMAIL PROTECTED]> wrote: > >> Dec 18 15:49:41 myhost postgres[29832]: [35-1] > >> ERROR: 23505: duplicate > >> key value violates unique constraint "foo_key" > >> Dec 18 15:49:41 myhost postgres[29832]: [

Re: [GENERAL] multiple version installation in the same machine ????

2007-12-18 Thread Bill Moran
In response to "Josh Harrison" <[EMAIL PROTECTED]>: > Hi > I have a postgres version 7.4 and version 8.3 installed in my system. > 7.4 uses port 5432 and 8.3 uses port 5433. > I started 7.4 and the database is running fine. Now i started the database > server in version 8.3 > and it started fine.

Re: [GENERAL] multiple version installation in the same machine ????

2007-12-18 Thread Josh Harrison
Thanks...It works... josh On Dec 18, 2007 3:06 PM, Richard Huxton <[EMAIL PROTECTED]> wrote: > Josh Harrison wrote: > > Hi > > I have a postgres version 7.4 and version 8.3 installed in my system. > > 7.4 uses port 5432 and 8.3 uses port 5433. > > I started 7.4 and the database is running fine.

Re: [GENERAL] multiple version installation in the same machine ????

2007-12-18 Thread Richard Huxton
Josh Harrison wrote: Hi I have a postgres version 7.4 and version 8.3 installed in my system. 7.4 uses port 5432 and 8.3 uses port 5433. I started 7.4 and the database is running fine. Now i started the database server in version 8.3 and it started fine. pg_ctl -D /export/home/josh/postgres8.3/

[GENERAL] multiple version installation in the same machine ????

2007-12-18 Thread Josh Harrison
Hi I have a postgres version 7.4 and version 8.3 installed in my system. 7.4 uses port 5432 and 8.3 uses port 5433. I started 7.4 and the database is running fine. Now i started the database server in version 8.3 and it started fine. pg_ctl -D /export/home/josh/postgres8.3/pgsql/data start -l log

[GENERAL] combining semi-duplicate rows

2007-12-18 Thread hjenkins
Hello, I have a table of rows which partially duplicate one another and need to be merged and moved into a table with a primary key. As an additional complication, some of the duplicates contain different information, ex.: schema1.datatable: key1 None None 34 schema2.datatable: key1 12

Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Weber, Geoffrey M.
OK - in that same vain, I thought of something even better - using dynamic SQL instead. It sped things up right away! Thanks for putting me on the right track! From: Scott Marlowe [EMAIL PROTECTED] Sent: Tuesday, December 18, 2007 12:02 PM To: Weber, Ge

[GENERAL] free ETL tool using postgreSQL, new major release

2007-12-18 Thread BenoƮt Carpentier
Dear all, I've released a graphical and simple ETL tool using postgreSQL under Windows. Is working with .txt or .csv files. It is called "Benetl" and you can find (and freely download) it at : www.benetl.net This is a second release is out (version 1.1), your comments are welcomed, there is a for

Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Scott Marlowe
On Dec 18, 2007 10:54 AM, Weber, Geoffrey M. <[EMAIL PROTECTED]> wrote: > Tom, > > Yes, the distribution must be what's doing it. I guess I knew that > subconciously, but was looking for something like hints to force the planner > to do what I wanted. Instead it looks like I'll have to do a bit

[GENERAL] Specify client encoding for backups...

2007-12-18 Thread Nathan Wilhelmi
Hello - We are using PG_ADMIN backup to create the schema DDL scripts for our application. Is there any way to get PGAdmin to not include the encoding value or configure PostgreSQL to set the client encoding to UNICODE? Having problems with the JDBC driver and the UTF8 encoding when we try to e

Re: [GENERAL] logging arguments to prepared statements?

2007-12-18 Thread rihad
Ted Byers wrote: --- rihad <[EMAIL PROTECTED]> wrote: Dec 18 15:49:41 myhost postgres[29832]: [35-1] ERROR: 23505: duplicate key value violates unique constraint "foo_key" Dec 18 15:49:41 myhost postgres[29832]: [35-4] INSERT INTO foo Dec 18 15:49:41 myhost postgres[29832]: [35-5] (a,b,c)

Re: [GENERAL] Efficiency vs. code bloat for SELECT wrappers

2007-12-18 Thread Colin Wetherbee
Colin Wetherbee wrote: My guess, having written this, is that your approach might be more useful for applications that rely heavily on interaction with a database. I'd appreciate any more comments you have on this, though. Tom, Sam, and Ted (a lovely assortment of three-letter names), thank y

Re: [GENERAL] Partitioned tables & Slony

2007-12-18 Thread Chris Browne
Goboxe <[EMAIL PROTECTED]> writes: > What need to be taken care of when replicating data from partitioned > tables? > > I have several master tables that are inherited by date either daily, > weekly and monthly. > > How to automate addition of newly created child tables into Slony > cluster? There

Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Weber, Geoffrey M.
Tom, Yes, the distribution must be what's doing it. I guess I knew that subconciously, but was looking for something like hints to force the planner to do what I wanted. Instead it looks like I'll have to do a bit of tweaking with my indexes. Probably a partial index on the 'not_displayed_id

Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Tom Lane
"Weber, Geoffrey M." <[EMAIL PROTECTED]> writes: > Hmm - good question! However, it is - both the id and > not_displayed_id are INTEGERs. Well, in that case it must be a statistics issue --- does the indexed column have a badly skewed distribution? You could investigate how many rows the planner

Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Weber, Geoffrey M.
Hmm - good question! However, it is - both the id and not_displayed_id are INTEGERs. Changing the function header to: CREATE OR REPLACE FUNCTION test_unlock ( id_locked alert.not_displayed_id%TYPE ) RETURNS alert.id%TYPE AS $test_unlock$ sadly doesn't affect the performance at all. I should

Re: [GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Tom Lane
"Weber, Geoffrey M." <[EMAIL PROTECTED]> writes: > The problem I'm having is in one particular spot where I'm trying to > run a "parametized" query inside a PL/PgSQL function. I wonder whether the parameter is actually of the same datatype as the indexed column. regards, t

Re: [GENERAL] logging arguments to prepared statements?

2007-12-18 Thread Ted Byers
--- rihad <[EMAIL PROTECTED]> wrote: > Dec 18 15:49:41 myhost postgres[29832]: [35-1] > ERROR: 23505: duplicate > key value violates unique constraint "foo_key" > Dec 18 15:49:41 myhost postgres[29832]: [35-4] > INSERT INTO foo > Dec 18 15:49:41 myhost postgres[29832]: [35-5] > (a,b,c) > Dec 1

Re: [GENERAL] postgres8.3beta encodding problem?

2007-12-18 Thread Andrew Dunstan
Martijn van Oosterhout wrote: On Tue, Dec 18, 2007 at 10:35:39AM -0500, Tom Lane wrote: Martijn van Oosterhout <[EMAIL PROTECTED]> writes: Ok, but that doesn't apply in this case, his database appears to be LATIN1 and this character is valid for that encoding... You know what,

[GENERAL] Problem with index not being chosen inside PL/PgSQL function...

2007-12-18 Thread Weber, Geoffrey M.
Hi all, Thanks to those on this list who contribute their knowledge for our consumption! I have another question: The problem I'm having is in one particular spot where I'm trying to run a "parametized" query inside a PL/PgSQL function. When I run the query directly, the planner correctly ch

Re: [GENERAL] postgres8.3beta encodding problem?

2007-12-18 Thread Martijn van Oosterhout
On Tue, Dec 18, 2007 at 10:35:39AM -0500, Tom Lane wrote: > Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > > Ok, but that doesn't apply in this case, his database appears to be > > LATIN1 and this character is valid for that encoding... > > You know what, I think the test in the code is back

Re: [GENERAL] postgres8.3beta encodding problem?

2007-12-18 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Mon, Dec 17, 2007 at 10:13:54AM -0800, Jeff Davis wrote: >> http://www.postgresql.org/docs/8.3/static/release-8-3.html > Ok, but that doesn't apply in this case, his database appears to be > LATIN1 and this character is valid for that encodin

Re: [GENERAL] slony error --need help

2007-12-18 Thread Tom Lane
"Josh Harrison" <[EMAIL PROTECTED]> writes: >> What version of Slony? same for both servers? > Yes slony version 1.2.12 Judging from the error message, you can't do that --- you need at least different versions of the .so file for 7.4 and 8.1. (GetTopTransactionId did not exist in 7.4.) But this

Re: [GENERAL] slony error --need help

2007-12-18 Thread Josh Harrison
On Dec 17, 2007 3:14 PM, Shane Ambler <[EMAIL PROTECTED]> wrote: > Not sure I can help much, I only read out of interest, but thought > clarifying a few things may help. > > SHARMILA JOTHIRAJAH wrote: > > Hi I had posted this in the slony mailing list but no luck in getting > > any answers...Pls h

[GENERAL] logging arguments to prepared statements?

2007-12-18 Thread rihad
Dec 18 15:49:41 myhost postgres[29832]: [35-1] ERROR: 23505: duplicate key value violates unique constraint "foo_key" Dec 18 15:49:41 myhost postgres[29832]: [35-4] INSERT INTO foo Dec 18 15:49:41 myhost postgres[29832]: [35-5](a,b,c) Dec 18 15:49:41 myhost postgres[29832]: [35-7] VALUES ($1

Re: [GENERAL] dblink does not connect when activated in a remote server

2007-12-18 Thread Terry Fielder
Does the remote server have the relevant port opened up in its firewall? Is postgres set to allow TCP/IP connections in the postgresql.conf? Terry Terry Fielder [EMAIL PROTECTED] Associate Director Software Development and Deployment Great Gulf Homes / Ashton Woods Homes Fax: (416) 441-9085

[GENERAL] dblink does not connect when activated in a remote server

2007-12-18 Thread Abraham, Danny
dblink problem: I am connecting to a remote server and run a functions that calls another one using db_link. It fails with the error message is 08001 - could not establish connection. When the function is located in a local server - it runs fine. The connection string is: 'hostaddr=127.0.0.1

Re: [GENERAL] postgres8.3beta encodding problem?

2007-12-18 Thread Martijn van Oosterhout
On Mon, Dec 17, 2007 at 10:13:54AM -0800, Jeff Davis wrote: > http://www.postgresql.org/docs/8.3/static/release-8-3.html > > "Ensure that chr() cannot create invalidly-encoded values (Andrew) Ok, but that doesn't apply in this case, his database appears to be LATIN1 and this character is valid f

[GENERAL] Restoring only some data from a backup file

2007-12-18 Thread mljv
hi, i run a webapp where lots of accounts are managing something. I do a nightly backup of my database. Sometime some users want to have their account restored from a backup days, weeks or months ago. At the moment i use (multi-column) natural keys. So each and every table has at least a colum

Re: [GENERAL] slony error --need help

2007-12-18 Thread Richard Huxton
SHARMILA JOTHIRAJAH wrote: I get theis error :21: PGRES_FATAL_ERROR load '$libdir/xxid'; - ERROR: could not load library "/export/home/josh/postgres7.4/lib/xxid.so": ld.so.1: postgres: fatal: relocation error: file /export/home/josh/postgres7.4/lib/xxid.so: symbol GetTopTransactionId: refere