Re: [GENERAL] Gentoo for production DB server?

2004-09-07 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremiah Elliott wrote: | Gaetano Mendola wrote: | |> Barry S wrote: |> |>> In article <[EMAIL PROTECTED]>, "Christine Desmuke" wrote: |>> |>>> Hello: |>>> |>>> At the risk of starting a flame-war, I'd like some more details on the |>>> use of Gentoo Li

Re: [GENERAL] sequences in schemas

2004-09-07 Thread Manfred Koizar
On Tue, 31 Aug 2004 11:09:07 -0400, Joe Maldonado <[EMAIL PROTECTED]> wrote: >CREATE SCHEMA joe >CREATE SEQUENCE joe_seq start 1 >CREATE TABLE joe_table (int id, varchar name) >; > >and I get a syntax error for SEQUENCE. This will work in 8.0. http://www.postgresql.org/docs/7.4/static/sql

Re: [GENERAL] Restoring dump of multiuser databases

2004-09-07 Thread Tom Lane
David Garamond <[EMAIL PROTECTED]> writes: > Is there an easier way? Use a newer version? pg_dumpall hasn't done it that way since 7.2. regards, tom lane ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-07 Thread Tom Lane
David Garamond <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Also, MD5 hashing is fast enough that I'm not sure the above is really >> significantly cheaper than a straight brute-force attack, ie, you just >> take your list of possible passwords and compute the hashes on the fly. >> The hashes a

Re: [GENERAL] [PERFORM] Table UPDATE is too slow

2004-09-07 Thread Ron St-Pierre
Tom Lane wrote: Ron St-Pierre <[EMAIL PROTECTED]> writes: One question about redirecting VACUUMs output to file though. When I run: psql -d imperial -c "vacuum full verbose analyze;" > vac.info vac.info contains only the following line: VACUUM I've been unable to capture the VERBOSE output t

[GENERAL] Restoring dump of multiuser databases

2004-09-07 Thread David Garamond
All of my non-superusers are restricted from creating databases. Whenever I upgrade Postgres, I have to hand-edit my dump and change: CREATE USER usr1 WITH SYSID 101 PASSWORD '...' NOCREATEDB NOCREATEUSER; into: CREATE USER usr1 WITH SYSID 101 PASSWORD '...' CREATEDB NOCREATEUSER; and then af

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-07 Thread David Garamond
Tom Lane wrote: I think David is suggesting that the hypothetical attacker could gain economies of scale in multiple attacks (ie, if he'd been able to steal the contents of multiple installations' pg_shadow, he'd only need to generate his long list of precalculated hashes once). I think this is to

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Tom Lane
Tore Halset <[EMAIL PROTECTED]> writes: > I need to debug all of the trafic between the server and the client to > track down this problem. I suspect that it's got nothing at all to do with the traffic between the server and the client, and that the SIGINT is coming from some outside agency. How

Re: [GENERAL] [PERFORM] Table UPDATE is too slow

2004-09-07 Thread Tom Lane
Ron St-Pierre <[EMAIL PROTECTED]> writes: > One question about redirecting VACUUMs output to file though. When I run: >psql -d imperial -c "vacuum full verbose analyze;" > vac.info > vac.info contains only the following line: >VACUUM > I've been unable to capture the VERBOSE output to file.

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-07 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > David Garamond wrote: >> Consider someone who creates a long list of: >> MD5( "postgres" + "" ) >> MD5( "postgres" + "aaab" ) >> MD5( "postgres" + "aaac" ) > But surely you have to store the random salt in pg_shadow too? Or am I > missi

Re: [GENERAL] supressing NOTICE messages on Windows/cygwin only not working?

2004-09-07 Thread Alex Soto
Thanks Tom, Embarassingly correct guesses. Thanks for the quick response. On Tue, 07 Sep 2004 11:29:17 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > Alex Soto <[EMAIL PROTECTED]> writes: > > I'm noticing NOTICE messages can't be turned off with my cygwin-based > > platform. I've had other's co

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-07 Thread Richard Huxton
David Garamond wrote: Consider someone who creates a long list of: MD5( "postgres" + "" ) MD5( "postgres" + "aaab" ) MD5( "postgres" + "aaac" ) ... Now if he has access to other people's pg_shadow, he can compare the hashes with his dictionary. Replacing "postgres" with a rando

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Andrew Janian
I restart postmaster. Keep in mind this is only in development. I am using a postgres manager (EMS PostgreSQL Manager 2 http://ems-hitech.com/pgmanager/) and that is where I am seeing this problem. I was sure there were better ways to solve it than restarting, but I am not worried since we do

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Tore Halset
On Sep 7, 2004, at 16:54, Tom Lane wrote: Tore Halset <[EMAIL PROTECTED]> writes: I am trying to port an old java application from MS SQL Server to PostgreSQL running on Mac OS X. ... The problem is that the server returns "ERROR: canceling query due to user request" on some of the queries. The pr

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-07 Thread David Garamond
Tom Lane wrote: I read that the password hash in pg_shadow is salted with username. Is this still the case? If so, since probably 99% of all PostgreSQL has "postgres" as the superuser name, wouldn't it be better to use standard Unix/Apache MD5 hash instead? How does that improve anything? If we

Re: [GENERAL] [PERFORM] Table UPDATE is too slow

2004-09-07 Thread Ron St-Pierre
Ron St-Pierre wrote: We have a web based application with data that is updated daily. The biggest bottleneck occurs when we try to update one of the tables. This table contains 58,000 rows and 62 columns, and EVERY column is indexed. Every column is queryable (?) by the users through the web inte

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Tore Halset
On Sep 7, 2004, at 15:11, Paul Thomas wrote: It sounds to my like your Java app is issueing the cancel. Something fishy is going on here as the application is very stable under MS SQL Server. I have tried to set log_statement to 'all'. All queries are displayed, but everything looks ok except for

[GENERAL] Selecting columns by position?

2004-09-07 Thread Jerry LeVan
Hi, Is there any generic to select columns by position ie select the first, third, and fifth columns from I can't see anything in SQL...not to sure about PL/PgSQL... Thanks Jerry ---(end of broadcast)--- TIP 6: Have you searched our list archives

Re: [GENERAL] restricting non superuser from accessing other

2004-09-07 Thread Oliver Elphick
On Tue, 2004-09-07 at 15:38, Tom Lane wrote: > Oliver Elphick <[EMAIL PROTECTED]> writes: > > On Tue, 2004-09-07 at 14:35, David Garamond wrote: > >> Thanks! So I must modify and kill -HUP postmaster everytime a new db is > >> added. Is there something like this in pg_hba.conf? > >> > >> local ow

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Tom Lane
"Andrew Janian" <[EMAIL PROTECTED]> writes: > I am experiencing a similar problem with PostgreSQL running on Debian. > I am not doing anything special when it happens, just once and a > while. It is not a production system (on which this problem does not > occur) so I just restart and everything i

Re: [GENERAL] supressing NOTICE messages on Windows/cygwin only not working?

2004-09-07 Thread Tom Lane
Alex Soto <[EMAIL PROTECTED]> writes: > I'm noticing NOTICE messages can't be turned off with my cygwin-based > platform. I've had other's confirm it works on linux. The SET will definitely turn off messages that the backend thinks it is delivering to the client. However, it won't turn off logg

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Andrew Janian
I am experiencing a similar problem with PostgreSQL running on Debian. I am not doing anything special when it happens, just once and a while. It is not a production system (on which this problem does not occur) so I just restart and everything is fine. I would be interested in seeing if this

Re: [GENERAL] explain with placeholders?

2004-09-07 Thread Dan Sugalski
At 10:39 AM -0400 9/7/04, Tom Lane wrote: Dan Sugalski <[EMAIL PROTECTED]> writes: Is there any way to convince explain to go do its thing when given a query with placeholders in it? PREPARE foo(...) AS SELECT ... EXPLAIN EXECUTE foo(...) EXPLAIN EXECUTE is a relatively recent additio

[GENERAL] supressing NOTICE messages on Windows/cygwin only not working?

2004-09-07 Thread Alex Soto
Hi, I'm noticing NOTICE messages can't be turned off with my cygwin-based platform. I've had other's confirm it works on linux. Here is my session: $ psql -U postgresql itn Welcome to psql 7.4.5, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help

[GENERAL] Problems importing data from plain text file

2004-09-07 Thread Mário Gamito
Hi, I have this plain text file with about 5000 lines. Each line may have 4 or 5 fields, all delimited with a tab. I've made a table named t_zip_codes with 5 fields. When i run (in postgres command line) the command COPY t_zip_code FROM zip_codes.txt; it aborts as soon as it reaches a line with onl

Re: [GENERAL] error: insert has more expressions than target column

2004-09-07 Thread Dino Vliet
MUCH better nowI did manage to get an insert into the table lessons with these adjustments...BUT now it seems the FOR LOOP didn't work because I only get 1 record and expected that I would get 8 records due to the i variabele. What could be wrong? My code is now: CREATE FUNCTION vulalles() R

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Tom Lane
Tore Halset <[EMAIL PROTECTED]> writes: > I am trying to port an old java application from MS SQL Server to > PostgreSQL running on Mac OS X. > ... > The problem is that the server returns "ERROR: canceling query due to > user request" on some of the queries. The proximate cause of this has to

Re: [GENERAL] ERROR: canceling query due to user request

2004-09-07 Thread Mr Pink
Hi, We were getting that problem on an old, low spec server that we know has memory problems. The error message occured only on larger jobs, such as restoring a large table. IIRC, I got the same problem last year after messing around with postgres config parameters, probably also a memory issu

Re: [GENERAL] explain with placeholders?

2004-09-07 Thread Tom Lane
Dan Sugalski <[EMAIL PROTECTED]> writes: > Is there any way to convince explain to go do its thing when given a > query with placeholders in it? PREPARE foo(...) AS SELECT ... EXPLAIN EXECUTE foo(...) EXPLAIN EXECUTE is a relatively recent addition, but I'm sure it's in 7.4 at l

Re: [GENERAL] restricting non superuser from accessing other

2004-09-07 Thread Tom Lane
Oliver Elphick <[EMAIL PROTECTED]> writes: > On Tue, 2004-09-07 at 14:35, David Garamond wrote: >> Thanks! So I must modify and kill -HUP postmaster everytime a new db is >> added. Is there something like this in pg_hba.conf? >> >> local owndb all md5 > No. You would have to have: > loc

Re: [GENERAL] error: insert has more expressions than target column

2004-09-07 Thread Tom Lane
Dino Vliet <[EMAIL PROTECTED]> writes: > I'm getting the same error without brackets. The message says you are trying to insert more values than the "lessons" table has columns. regards, tom lane ---(end of broadcast)--- TIP

Re: [GENERAL] HOWTO: Get a table or database definition

2004-09-07 Thread Jeff Boes
Google Mike wrote: I guess it would be great if Pgsql had a way to find a database definition via a system stored procedure like other database platforms have. There are a few: nexcerpt=# \df pg_get*def List of functions Result data type | Schema | Name