Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Lee Wu
Title: Re: [ADMIN] pg_dump, pg_restore, insert vs copy The dump file is binary format when using: pg_dump -Fc --compress=9 From: Uwe C. Schroeder [mailto:[EMAIL PROTECTED]Sent: Thu 3/24/2005 8:57 PMTo: Lee WuCc: Tom Lane; pgsql-admin@postgresql.orgSubject: Re: [ADMIN] pg_dump, pg_res

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Uwe C. Schroeder
On Thursday 24 March 2005 08:35, Lee Wu wrote: > I believe you're right. > > Any easy way to find out if -d was used if dump is done someone else? yes, just look into your dump file. If it contains INSERT statements -d was used, if it contains COPY statement -d was not used. > > Thanks, > > --

[ADMIN] Calling Functions from Delete Rules (+ contrib/pgcrypto) = madnes s?

2005-03-24 Thread Moran.Michael
Hello there, I have a View with a Delete rule and I would like the Delete rule to call a function (and pass-in a few of the the underlying View's/Table's column values). How do you do this? When I do it, I keep getting the following error: ERROR: function expression in FROM may not refer to

Re: [ADMIN] Very worried about this

2005-03-24 Thread Kris Kiger
Heh, I see. The sequence currval was set lower than what was already in the table. It just so happened we had holes in our data for the values it was selecting. Thanks for pointing that out! Kris Michael Fuhr wrote: On Thu, Mar 24, 2005 at 04:45:02PM -0500, Kris Kiger wrote: I'm positive n

Re: [ADMIN] Very worried about this

2005-03-24 Thread Steve Crawford
On Thursday 24 March 2005 1:45 pm, Kris Kiger wrote: > I'm positive no one else has been in the database. There are two > of us who work on it and we have been side by side all afternoon. > The problem appears to be purely internal to the database. I'm > running more tests as we speak and we are

Re: [ADMIN] Very worried about this

2005-03-24 Thread Tom Lane
Kris Kiger <[EMAIL PROTECTED]> writes: > I'm positive no one else has been in the database. There are two of us > who work on it and we have been side by side all afternoon. The problem > appears to be purely internal to the database. I'm running more tests > as we speak and we are still reci

Re: [ADMIN] Very worried about this

2005-03-24 Thread Michael Fuhr
On Thu, Mar 24, 2005 at 04:45:02PM -0500, Kris Kiger wrote: > I'm positive no one else has been in the database. There are two of us > who work on it and we have been side by side all afternoon. The problem > appears to be purely internal to the database. I'm running more tests > as we speak

Re: [ADMIN] Very worried about this

2005-03-24 Thread Kris Kiger
I'm positive no one else has been in the database. There are two of us who work on it and we have been side by side all afternoon. The problem appears to be purely internal to the database. I'm running more tests as we speak and we are still recieving the same sporadic errors. It works for

Re: [ADMIN] Very worried about this

2005-03-24 Thread Scott Marlowe
On Thu, 2005-03-24 at 15:21, Kris Kiger wrote: > I have a table that looks like this: > > Table "public.hd" > Column |Type > |Modifiers > ---+-

[ADMIN] Very worried about this

2005-03-24 Thread Kris Kiger
I have a table that looks like this: Table "public.hd" Column |Type |Modifiers ---+-+-

Re: [ADMIN] Copying large tables with DBLink

2005-03-24 Thread Michael Fuhr
On Thu, Mar 24, 2005 at 01:59:44PM -0500, Chris Hoover wrote: > > Has anyone had problems with memory exhaustion and dblink? We were > trying to use dblink to convert our databases to our new layout, and had > our test server lock up several times when trying to copy a table that > was signific

Re: [ADMIN] Copying large tables with DBLink

2005-03-24 Thread Tom Lane
"Chris Hoover" <[EMAIL PROTECTED]> writes: > Has anyone had problems with memory exhaustion and dblink? We were > trying to use dblink to convert our databases to our new layout, and had > our test server lock up several times when trying to copy a table that > was significantly larger than our

Re: [ADMIN] Copying large tables with DBLink

2005-03-24 Thread Joe Conway
Chris Hoover wrote: Has anyone had problems with memory exhaustion and dblink? We were trying to use dblink to convert our databases to our new layout, and had our test server lock up several times when trying to copy a table that was significantly larger than our memory and swap. Basically whe

[ADMIN] Copying large tables with DBLink

2005-03-24 Thread Chris Hoover
Has anyone had problems with memory exhaustion and dblink? We were trying to use dblink to convert our databases to our new layout, and had our test server lock up several times when trying to copy a table that was significantly larger than our memory and swap. Basically where were doing an i

Re: [ADMIN] Admin tools with the ability to alter a field type?

2005-03-24 Thread John DeSoi
On Mar 24, 2005, at 9:43 AM, Joel Fradkin wrote: I asked this once before and got one response that I did not understand completely. Is there a tool that allows modification to a field type. The answer I got last time indicated that in 8.0 there was a command to do it by in a sql statement. But

Re: [ADMIN] How to move the ...

2005-03-24 Thread Olivier Martineau
You just have to run again the initdb command with -D option : initdb - D D:\DataPG Then, you'll have to start the database server with this command : pg_ctl -D D:\DataPG start dedy a ÃcritÂ: I have just installed PostgreSQL (postgresql-8.0.1.zip) on a Windows 2K Prof platform. but the th

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Is there any reason why we don't use a binary storage in custom format > dumps? I mean, we could open a binary cursor and write the results to > the file, and read it back at restore time. This is just handwaving of > course. > I guess the reason is c

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Alvaro Herrera
On Thu, Mar 24, 2005 at 10:52:06AM -0500, Tom Lane wrote: > "Lee Wu" <[EMAIL PROTECTED]> writes: > > When I use pg_dump to back up the whole database and then pg_restore an > > individual table, > > pg_restore uses COPY. Great. > > When I use pg_dump to back up an individual table and pg_restore i

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Lee Wu
I believe you're right. Any easy way to find out if -d was used if dump is done someone else? Thanks, -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Thursday, March 24, 2005 9:11 AM To: Lee Wu Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] pg_dump, pg_restore, in

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Tom Lane
"Lee Wu" <[EMAIL PROTECTED]> writes: > MY OS command is: > pg_restore -v -t mytable -d mydb -U postgres -R my.dmp That doesn't prove a thing; the question is what you typed at pg_dump. Thinking about it, I wonder if you did "pg_dump -d mydb ..." -d means something different to pg_dump than pg_res

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Lee Wu
OK, here is what I see: from top: 17718 postgres 25 0 293M 293M 292M R22.2 7.6 28:26 2 postgres: postgres mydb 127.0.0.1:41972 INSERT MY OS command is: pg_restore -v -t mytable -d mydb -U postgres -R my.dmp SQL from database: mydb=# select datname, procpid, current_query mydb-# fr

Re: [ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Tom Lane
"Lee Wu" <[EMAIL PROTECTED]> writes: > When I use pg_dump to back up the whole database and then pg_restore an > individual table, > pg_restore uses COPY. Great. > When I use pg_dump to back up an individual table and pg_restore it, > pg_restore uses INSERT. Not for me... That decision is fixed

[ADMIN] pg_dump, pg_restore, insert vs copy

2005-03-24 Thread Lee Wu
Hi,   When I use pg_dump to back up the whole database and then pg_restore an individual table, pg_restore uses COPY. Great.   When I use pg_dump to back up an individual table and pg_restore it, pg_restore uses INSERT.     Method 1: pg_dump mydb -R -Fc --compress=9 > method1.dmp

Re: [ADMIN] Why this Query Plan is different

2005-03-24 Thread Tom Lane
"Thilina Gunasekara" <[EMAIL PROTECTED]> writes: > This is Box A which runs on 7.4.5 and delivers very quick result. > ... > ** And this is the Box B which runs on 7.3.9 and takes hours to deliver > the result. Well, that's what I'd expect. There's a reason why we put a great deal of eff

[ADMIN] Admin tools with the ability to alter a field type?

2005-03-24 Thread Joel Fradkin
I asked this once before and got one response that I did not understand completely. Is there a tool that allows modification to a field type. The answer I got last time indicated that in 8.0 there was a command to do it by in a sql statement. But I did not understand that syntax well eno

Re: [ADMIN] public key authentification

2005-03-24 Thread Magnus Hagander
> is there a way to do pubkey authentification (like ssh) with > postgresql and the psql frontend ? Not really. You can use SSH forwarding of the connection, and use the public key authentication for that one. Or you can use Kerberos 5 - while not public key authentication, it may accomplish wh

Re: [ADMIN] cast not IMMUTABLE?

2005-03-24 Thread Alvaro Herrera
On Thu, Mar 24, 2005 at 02:15:52PM +0100, Enrico Weigelt wrote: > * Tom Lane <[EMAIL PROTECTED]> wrote: > > > > > why that cast is not considered IMMUTABLE ? > > > > Because it depends on your TimeZone setting. Observe: > > BTW: whats really the difference between timezone and > timezonetz ? I

Re: [ADMIN] cast not IMMUTABLE?

2005-03-24 Thread Enrico Weigelt
* Tom Lane <[EMAIL PROTECTED]> wrote: > > > why that cast is not considered IMMUTABLE ? > > Because it depends on your TimeZone setting. Observe: BTW: whats really the difference between timezone and timezonetz ? I always used to use timestamp (w/o tz) and thought timestamptz was just an quest

[ADMIN] public key authentification

2005-03-24 Thread Enrico Weigelt
Hi folks, is there a way to do pubkey authentification (like ssh) with postgresql and the psql frontend ? thx. -- - Enrico Weigelt== metux IT service phone: +49 36207 519931 www: http://www.metux.

Re: [ADMIN] Why this Query Plan is different

2005-03-24 Thread Thilina Gunasekara
Hi Tom, Begging your pardon for mislabeling the query plan output, please find the correctly labeled output. This is Box A which runs on 7.4.5 and delivers very quick result. production=# SELECT version(); version ---

Re: [ADMIN] Resizing images contained in oid fields

2005-03-24 Thread Juan Miguel
Michael Fuhr wrote: On Mon, Mar 21, 2005 at 05:12:52PM +0100, [EMAIL PROTECTED] wrote: I have a table where an oid field is used for saving images. I'm thinking about getting a little snapshot of all images without downloading the full images. I only want to download some entire images. I'm thin