[ADMIN] pg_dump and Users

2003-01-14 Thread Gareth Kirwan
Title: Gareth Stationery



Hey everyone,
 
    Just a 
quicky...
    I need to dump a database 
completely while a system is re-installed.. and then reload it 
afterwards.
    I'm planning on using 

    
pg_dump -C database > Flatfile
    
pgsql -d database -f Flatfile
    But this doesn't account 
for the handling of users and user creation.
 
    Can anyone tell me how I 
should be doing this ?
 
    Cheers
 
Gareth KirwanProgramming & 
Development,Thermeon Europe Ltd,[EMAIL PROTECTED] Tel: +44 
(0) 1293 864 303Thermeon 
Europe e-Card: gbjk 


Re: [ADMIN] pg_dump and Users

2003-01-14 Thread Gareth Kirwan
How does pg_dumpall sound ?


-Original Message-

Hey everyone,

Just a quicky...
I need to dump a database completely while a system is re-installed..
and then reload it afterwards.
I'm planning on using
pg_dump -C database > Flatfile
pgsql -d database -f Flatfile
But this doesn't account for the handling of users and user creation.

Can anyone tell me how I should be doing this ?

Cheers

Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
[EMAIL PROTECTED]
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[ADMIN] is it safe to change pg_type ?

2003-01-14 Thread Rajesh Kumar Mallah.


Hi ,

in the lack of ALTER DOMAIN command , if i have to 
increase from varchar(100) to varchar(250) for a given domain
can i safetly update typtypmod in pg_type ?


regds
mallah.


-- 
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [ADMIN] query problem

2003-01-14 Thread Nick Fankhauser
Helen-

What I meant by "code sample" was the java code. Clearly there is nothing
wrong with the sql, but since you're probably returning more columns with
the first statement than the second one, my guess is that the java code
which processes the ResultSet works in the first case because it is
expecting more than 2 columns, but fails in the second when it attempts to
process the third and subsequent columns. Looking at the java code for
processing the result would tell us for sure.

-Nick


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of helen liu
Sent: Monday, January 13, 2003 11:17 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [ADMIN] query problem


Nick,
Thank you very much for your response. Actually, here is the details:-
I have a Students table with only three columns: firstname, lastname, email.
I issued the following select statements:
1) select * from students;
2). select firstname, last name from students;
query 1) worked fine, but query 2) got the following message in client side:
"connect and execute query: The column index is out of range."
and at db server side, I got error message:
"LOG:  pq_recvbuf: recv() failed: Connection reset by peer"
I feel that JDBC doesn't like query 2). because both query 1) & 2) works if
queried in db directly.
Many thanks for any clarification on this.
Helen
 Nick Fankhauser <[EMAIL PROTECTED]> wrote:
Helen-

There is a separate JDBC list for related questions that I suggest you use
in the future.

A code sample is needed for a really good answer, but I'll make a guess.
This message is probably telling you that you are either trying to set a
value in a where clause that has a higher index than the number you
prepared. (eg: you have two columns constrained and tried to set a third.)
Or, you are trying to read a column from the resultset that has a higher
index than those you defined when preparing the statement. (eg: your query
returns two fields and you're asking for a third.)

Your SQL statement may look fine, but you're either setting or getting
something that it doesn't have.

-Nick




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of helen liuSent: Monday,
January 13, 2003 11:44 AM
To: [EMAIL PROTECTED]
Subject: [ADMIN] query probelm


Hello,
I am new in postgresql. sorry if I may ask simple question. I got error
message when I pass sql statement into database through JDBC. the error msg
is:
"connect and execute query: The column index is out of range."
I check the sql statement string passed into db, it looks fine. I have no
idea what is going wrong. any help is highly appreciated.
Helen




Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])




Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[ADMIN] Newbie question

2003-01-14 Thread David
Title: Newbie question


How to grant a
whole database for a certain user ?
i
mean:

grant usage on
mydb.* to myuser identified by 'mypasswd'

Is available
something similar with postgres or should i write a shell script, for
example?
Thank you very
much!!!



Re: [ADMIN] Newbie question

2003-01-14 Thread Robert Treat
On Tue, 2003-01-14 at 09:12, David wrote:
> How to grant a whole database for a certain user ?
> i mean:
> 
> grant usage on mydb.* to myuser identified by 'mypasswd'
> 
> Is available something similar with postgres or should i write a shell
> script, for example?
> Thank you very much!!!

You'll need to right a shell script or a server side function to do
this.  

BTW - some people have talked about adding this feature in the past, and
I think that if the code were submitted it wouldn't be rejected, but
AFAIK the SQL standard doesn't support setting the privileges on more
than one table per command so it is low priority for the main
development team.

Robert Treat



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[ADMIN] Case Studio Postgresql

2003-01-14 Thread Vida Luz Arista
Hi,

I am analyzing to Postgresql for e-goverment, nevertheless I need to know
in that companies, country and so that aims this being used this data
base. 

Where I can Find this information?

Thanks in Advanced,

Regards.


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [ADMIN] Case Studio Postgresql

2003-01-14 Thread Jyry Kuukkanen

Hello Vida Luz Arista

I am not quite sure what do you mean by your message.

Do you want links or such of companies or goverments who are currently 
using PostgreSQL?

Cheers,
--jq


On Tue, 14 Jan 2003, Vida Luz Arista wrote:

> Hi,
> 
> I am analyzing to Postgresql for e-goverment, nevertheless I need to know
> in that companies, country and so that aims this being used this data
> base. 
> 
> Where I can Find this information?
> 
> Thanks in Advanced,
> 
> Regards.
> 
> 
> ---(end of broadcast)---
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

-- 
--Jyry
"Pornoteollisuudessa liikkuu sadat miljoonat. Sosiaalipornossa vain kymmenet.
Karpolla on vielä asiaa."
C:-(C:-/C8-OC8-/C:-(


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [ADMIN] Case Studio Postgresql

2003-01-14 Thread David F. Skoll
On Tue, 14 Jan 2003, Vida Luz Arista wrote:

> I am analyzing to Postgresql for e-goverment, nevertheless I need to know
> in that companies, country and so that aims this being used this data
> base.

My anti-spam solution at http://www.canit.ca/ is built around
PostgreSQL.  The largest installation is on a couple of Linux servers
that serve about 10,000 e-mail addresses, and the daily message volume
is probably on the order of 80-100K messages.  PostgreSQL has
performed admirably.

--
David.

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [ADMIN] Case Studio Postgresql

2003-01-14 Thread Tim Ellis
On Tue, 2003-01-14 at 13:20, Vida Luz Arista wrote:
> I am analyzing to Postgresql for e-goverment, nevertheless I need to know
> in that companies, country and so that aims this being used this data
> base. 
> 
> Where I can Find this information?

Hola,

There are case studies on the PostgreSQL website:
  http://advocacy.postgresql.org/casestudies

¿Usted intentó utilizar Google para traducir de español al inglés?  El
traductor que usted utilizó hecho muy duro-a-leyo' inglés.  Utilicé
Google para este inglés a la traducción española.
  http://translate.google.com/translate_t

[English: Did you try to use Google to translate from Spanish to
English? The translator you used made very hard-to-read English. I used
Google for this English to Spanish translation.]

--
Tim Ellis
Senior Database Architect



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [ADMIN] Case Studio Postgresql

2003-01-14 Thread Vida Luz Arista
Yes, I am searching companies or goverments who are currently
using PostgreSQL

Regards,



On Tue, 14 Jan 2003, Jyry Kuukkanen wrote:

> 
> Hello Vida Luz Arista
> 
> I am not quite sure what do you mean by your message.
> 
> Do you want links or such of companies or goverments who are currently 
> using PostgreSQL?
> 
> Cheers,
> --jq
> 
> 
> On Tue, 14 Jan 2003, Vida Luz Arista wrote:
> 
> > Hi,
> > 
> > I am analyzing to Postgresql for e-goverment, nevertheless I need to know
> > in that companies, country and so that aims this being used this data
> > base. 
> > 
> > Where I can Find this information?
> > 
> > Thanks in Advanced,
> > 
> > Regards.
> > 
> > 
> > ---(end of broadcast)---
> > TIP 6: Have you searched our list archives?
> > 
> > http://archives.postgresql.org
> > 
> 
> 

-- 
\/_\_

Saludos, 
"La Vida"


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [ADMIN] Deadlock Checker doesn't see foreign-key locks

2003-01-14 Thread Andrew Biagioni




Stephan Szabo wrote:

  On Mon, 13 Jan 2003, Andrew Biagioni wrote:

  
  
It appears to me that the Deadlock Checker doesn't see (and thus
release) foreign-key-based locks (see below for details).  Am I missing
something?  Is there a configuration item I am unaware of?

  
  
We're going to need a runnable example, I'm not 100% sure which tables
are referencing which other tables and how given the text below. I have
gotten deadlock messages from the foreign keys in the past though.
  


I tried to create a runnable example, and as it turns out I can't reproduce
the problem in a proof-of-concept configuration.  I'll have to do some more
homework to determine the REAL scenario in which my problem occurs (and thus,
the real cause of the problem).

  
  
  
HOWEVER, if I have a foreign-key-related lock, as follows, it is not
recognized:

Thread A:  BEGIN WORK;
UPDATE [table A, row W]
/* This has a foreign key into table F, row P */

Thread B:  BEGIN WORK;
UPDATE [table B, row Y]
/* This has a foreign key into table G, row Q */

Thread A:  UPDATE [table B, row Z]
/* This has a foreign key into table F, row P */

Thread B:  UPDATE [table A, row X]
/* This has a foreign key into table G, row Q */

Note that none of the UPDATEs step on the same actual row of the same
table, but they step (and lock) the same rows in the same tables via
foreign keys.

In this case (specifically tested), there is no deadlock detection.

  
  
Do you get a deadlock?  Given the text above, I wouldn't expect one since
both transactions have the locks already when the second request for
the same lock comes in (unless you meant to swap A and B in the bottom
two).
  


Thanks,

                Andrew


  
  





[ADMIN] replication recommendations

2003-01-14 Thread Matt Doughty
I would like to setup database replication.  It will primarily be used to
maintain a quick swappable spare. I would also like to be able to 
shutdown backup occationally to make file system level backups while
maintaining the ability to bring the spare up to date with the primary
database once it comes back on lines.  I'm looking for recommendations
of the best solution to use.  Is there any sort of concensus?

thanks,

--Matt


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly