Re: [GENERAL] copy/dump database to text/csv files

2014-07-25 Thread Francisco Olarte
Hi William: On Thu, Jul 24, 2014 at 9:04 PM, William Nolf bn...@xceleratesolutions.com wrote: We have a postgres database that was used for an application we no longer use. However, we wouldlike to copy/dump the tables to files, text or csv so we can post them to sharepoint. How BIG

Re: [GENERAL] copy/dump database to text/csv files

2014-07-25 Thread Marc Mamin
This is probably an easy one for most sql users but I don't use it very often. We have a postgres database that was used for an application we no longer use. However, we would like to copy/dump the tables to files, text or csv so we can post them to sharepoint. Copy seems to be what I

[GENERAL] copy/dump database to text/csv files

2014-07-24 Thread William Nolf
This is probably an easy one for most sql users but I don't use it very often. We have a postgres database that was used for an application we no longer use. However, we would like to copy/dump the tables to files, text or csv so we can post them to sharepoint. Copy seems to be what I

Re: [GENERAL] copy/dump database to text/csv files

2014-07-24 Thread John R Pierce
On 7/24/2014 12:04 PM, William Nolf wrote: This is probably an easy one for most sql users but I don't use it very often. We have a postgres database that was used for an application we no longer use. However, we would like to copy/dump the tables to files, text or csv so we can post

Re: [GENERAL] copy/dump database to text/csv files

2014-07-24 Thread Thomas Kellerer
William Nolf wrote on 24.07.2014 21:04: This is probably an easy one for most sql users but I don't use it very often. We have a postgres database that was used for an application we no longer use. However, we would like to copy/dump the tables to files, text or csv so we can post them to

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Karsten Hilbert
On Thu, Jun 24, 2010 at 11:29:48AM +0800, Craig Ringer wrote: You might want to investigate internationalization options instead, where you can process your master sources to produce a list of strings, and have translators translate those strings. Your code loads the string lists, and

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Dimitri Fontaine
Merlin Moncure mmonc...@gmail.com writes: On Wed, Jun 23, 2010 at 3:21 PM, Jamie Kahgee jamie.kah...@gmail.com wrote: I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages,  is there an easy way to copy an entire schema to a

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Karsten Hilbert
This adds significant complexity to your code, especially since (AFAIK) there aren't really any good i18n tools for Pg's SQL, PL/PgSQL, etc. But there is - whether good or not: Go to http://gitorious.org/gnumed and browse the tree under gnumed/server/SQL/. Look at the i18n schema which

[GENERAL] copy/duplicate database schemas

2010-06-23 Thread Jamie Kahgee
I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages, is there an easy way to copy an entire schema to a new one (tables, contents, trigges, functions, etc..)? right now i just have - schema what I want is - schema

Re: [GENERAL] copy/duplicate database schemas

2010-06-23 Thread Merlin Moncure
On Wed, Jun 23, 2010 at 3:21 PM, Jamie Kahgee jamie.kah...@gmail.com wrote: I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages,  is there an easy way to copy an entire schema to a new one (tables, contents, trigges,

Re: [GENERAL] copy/duplicate database schemas

2010-06-23 Thread Craig Ringer
On 24/06/10 03:21, Jamie Kahgee wrote: I have an application in a schema and now i need to create other schemas b/c the app needs to support different languages, is there an easy way to copy an entire schema to a new one (tables, contents, trigges, functions, etc..)? Others have replied with

Re: [GENERAL] Copy the database..

2007-11-06 Thread Sascha Bohnenkamp
if you dump/undump using a pipe there is no temp file ... Abandoned schrieb: On Nov 2, 3:49 pm, Sascha Bohnenkamp [EMAIL PROTECTED] wrote: maybe pg_dump | pg_undump could work? I mean pg_dump with the appropriate parameters and undump directly to the other database? This may one of the

Re: [GENERAL] Copy the database..

2007-11-06 Thread Sascha Bohnenkamp
maybe pg_dump | pg_undump could work? I mean pg_dump with the appropriate parameters and undump directly to the other database? This may one of the fastest ways to do it I think. Abandoned schrieb: Hi.. I want to copy my database.. I have a database which is name db01 and i want to copy it

[GENERAL] Copy the database..

2007-11-06 Thread Abandoned
Hi.. I want to copy my database.. I have a database which is name db01 and i want to copy it as name db01copy ? How can i do this ? This database is very big 200GB so i want to the fastest way. Also if you suggest pg_dump how can i remove the dump data after copying ? Note: I have a root account

Re: [GENERAL] Copy the database..

2007-11-06 Thread Abandoned
On Nov 2, 3:49 pm, Sascha Bohnenkamp [EMAIL PROTECTED] wrote: maybe pg_dump | pg_undump could work? I mean pg_dump with the appropriate parameters and undump directly to the other database? This may one of the fastest ways to do it I think. Abandoned schrieb: Hi.. I want to copy my

Re: [GENERAL] Copy the database..

2007-11-06 Thread Abandoned
On Nov 2, 5:30 pm, Sascha Bohnenkamp [EMAIL PROTECTED] wrote: if you dump/undump using a pipe there is no temp file ... Abandoned schrieb: On Nov 2, 3:49 pm, Sascha Bohnenkamp [EMAIL PROTECTED] wrote: maybe pg_dump | pg_undump could work? I mean pg_dump with the appropriate parameters

Re: [GENERAL] Copy the database..

2007-11-06 Thread Martijn van Oosterhout
On Sat, Nov 03, 2007 at 01:42:09PM -, Abandoned wrote: I tryed pg_dump but it is very slowly. Are there any faster way to copy database? Have you tried CREATE DATABASE .. TEMPLATE ? (See amual for syntax) Have a nice day, -- Martijn van Oosterhout [EMAIL PROTECTED]

Re: [GENERAL] Copy the database..

2007-11-06 Thread Scott Marlowe
On 11/3/07, Abandoned [EMAIL PROTECTED] wrote: I tryed pg_dump but it is very slowly. Are there any faster way to copy database? Assuming it's all happening on the same db server, yes: psql template1 create database newdb template olddb ---(end of

Re: [GENERAL] Copy the database..

2007-11-05 Thread Rainer Bauer
Tom Lane wrote: Rainer Bauer [EMAIL PROTECTED] writes: Wouldn't it be possible to copy the database folder and somehow instruct the postmaster to include the copied data after a restart? See CREATE DATABASE's TEMPLATE option. It's a bit crude but I think it'll help. Thanks, Tom. Works like a

Re: [GENERAL] Copy the database..

2007-11-04 Thread Julio Cesar Sánchez González
El dom, 04-11-2007 a las 02:16 +0100, Rainer Bauer escribió: Abandoned wrote: I tryed pg_dump but it is very slowly. Are there any faster way to copy database? Actually, I was looking for something along the same line. I often want to test some functionality in my program based on the

Re: [GENERAL] Copy the database..

2007-11-03 Thread Rainer Bauer
Abandoned wrote: I tryed pg_dump but it is very slowly. Are there any faster way to copy database? Actually, I was looking for something along the same line. I often want to test some functionality in my program based on the same dataset. However, dump/restore takes too long to be of any use.

Re: [GENERAL] Copy the database..

2007-11-03 Thread Tom Lane
Rainer Bauer [EMAIL PROTECTED] writes: Wouldn't it be possible to copy the database folder and somehow instruct the postmaster to include the copied data after a restart? See CREATE DATABASE's TEMPLATE option. It's a bit crude but I think it'll help. regards, tom lane

Re: [GENERAL] copy a database

2004-08-26 Thread David Suela Fernández
El mié, 25-08-2004 a las 20:54, Tom Lane escribió: David Suela =?ISO-8859-1?Q?Fern=E1ndez?= [EMAIL PROTECTED] writes: The problem is that pg_dump always give me the next error: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: relation pg_user does not exist Have

Re: [GENERAL] copy a database

2004-08-26 Thread Tom Lane
David Suela =?ISO-8859-1?Q?Fern=E1ndez?= [EMAIL PROTECTED] writes: It return: ERROR: permission denied to create pg_catalog.pg_user DETAIL: System catalog modifications are currently disallowed. How can i change this permissions? IIRC, you need to run a standalone backend, with either the

Re: [GENERAL] copy a database

2004-08-26 Thread Guy Fraser
Have you tried to use copy to export the data from each table? As a last resort you could try this, since you said you can still select data from the tables. Make a list of tables then : sed -e /^.*/copy TO '.sql';/ table.list | psql database This should create a file for each table ending with

Re: [GENERAL] copy a database

2004-08-25 Thread Oliver Elphick
On Wed, 2004-08-25 at 15:08, David Suela Fernández wrote: The problem is that pg_dump always give me the next error: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: relation pg_user does not exist pg_dump: The command was: SELECT (SELECT usename FROM pg_user WHERE

Re: [GENERAL] copy a database

2004-08-25 Thread Alvaro Herrera
On Wed, Aug 25, 2004 at 04:25:02PM +0100, Oliver Elphick wrote: On Wed, 2004-08-25 at 15:08, David Suela Fernández wrote: The problem is that pg_dump always give me the next error: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: relation pg_user does not exist

Re: [GENERAL] copy a database

2004-08-25 Thread Alvaro Herrera
On Wed, Aug 25, 2004 at 12:09:58PM -0400, Alvaro Herrera wrote: No, pg_user is a view on pg_shadow ... SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usesuper, pg_shadow.usecatupd, ''::text AS passwd, pg_shadow.valuntil, pg_shadow.useconfig FROM

Re: [GENERAL] copy a database

2004-08-25 Thread Oliver Elphick
On Wed, 2004-08-25 at 17:09, Alvaro Herrera wrote: On Wed, Aug 25, 2004 at 04:25:02PM +0100, Oliver Elphick wrote: Maybe recreating pg_user in the database will help. It is a global table, so if you have other databases where pg_user exists, copy the row from pg_class in that database to