Re: [SQL] backup and document views and user functions

2010-08-30 Thread Pavel Stehule
hello 2010/8/30 Peter Steinheuser : > You'll probably have to write something (a function) that pulls the data out > of pg_catalog. > You can get a leg up on that by connecting to psql using -E, which echoes > hidden queries. > If you do a \df+   on a function, you'll see the query PG uses. > the

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Peter Steinheuser
You'll probably have to write something (a function) that pulls the data out of pg_catalog. You can get a leg up on that by connecting to psql using -E, which echoes hidden queries. If you do a \df+ on a function, you'll see the query PG uses. ex. production=# \df+ myschema.* * QUERY **

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Reinoud van Leeuwen
On Mon, Aug 30, 2010 at 09:21:06PM +0300, David Harel wrote: > Hi, > > I am looking for an easy way to backup views and functions. I want to > store them in our version control system. > > Using pgAdmin I can access them one at a time. I am looking for a better > reporting mechanism. psql shell

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Hélder M . Vieira
Hi. I am looking for an easy way to backup views and functions. I want to store them in our version control system. Well... As far as I can see, for functions you should go to the 'pg_catalog' schema, table 'pg_proc'. In column 'prosrc' you will find the original text, but other attributes a

Re: [SQL] backup and document views and user functions

2010-08-30 Thread Pavel Stehule
Hello 2010/8/30 David Harel : > Hi, > > I am looking for an easy way to backup views and functions. I want to store > them in our version control system. > move your functions and view to separate schema - and do backup with pg_dump -n schema regards Pavel Stehule > Using pgAdmin I can access

[SQL] backup and document views and user functions

2010-08-30 Thread David Harel
Hi, I am looking for an easy way to backup views and functions. I want to store them in our version control system. Using pgAdmin I can access them one at a time. I am looking for a better reporting mechanism. psql shell command for such report will be just fine. Sorry for the lame question

Re: [SQL] backup

2009-06-09 Thread Abbas
ay, June 09, 2009 6:03 PM > To: pgsql-sql@postgresql.org > Subject: Re: [SQL] backup > > On 2009-06-09, Jyoti Seth wrote: > > This is a multipart message in MIME format. > > > > --=_NextPart_000_003C_01C9E916.43A8D460 > > Content-Type: text/plain; > >

Re: [SQL] backup

2009-06-09 Thread Jyoti Seth
Thanks it worked when I changed the command '/copy' to '\copy' -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Jasen Betts Sent: Tuesday, June 09, 2009 6:03 PM To: pgsql-sql@postgresql.org Subject: Re: [SQL

Re: [SQL] backup

2009-06-09 Thread Gurjeet Singh
gresql.org] > On Behalf Of Jasen Betts > Sent: Tuesday, June 09, 2009 6:03 PM > To: pgsql-sql@postgresql.org > Subject: Re: [SQL] backup > > On 2009-06-09, Jyoti Seth wrote: > > This is a multipart message in MIME format. > > > > --=_NextPart_000_003C_01C9E91

Re: [SQL] backup

2009-06-09 Thread Jyoti Seth
Subject: Re: [SQL] backup On 2009-06-09, Jyoti Seth wrote: > This is a multipart message in MIME format. > > --=_NextPart_000_003C_01C9E916.43A8D460 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: 7bit > > Hi all, > &

Re: [SQL] backup

2009-06-09 Thread Jasen Betts
On 2009-06-09, Jyoti Seth wrote: > This is a multipart message in MIME format. > > --=_NextPart_000_003C_01C9E916.43A8D460 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: 7bit > > Hi all, > > > > Can we take backup of specific data of a table (using where

Re: [SQL] backup

2009-06-09 Thread Ashish Karalkar
Jyoti Seth wrote: Hi all, Can we take backup of specific data of a table (using where clause)? Thanks, Jyoti Try Selective COPY With Regards Ashish Karalkar EnterpriseDB -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://w

[SQL] backup

2009-06-09 Thread Jyoti Seth
Hi all, Can we take backup of specific data of a table (using where clause)? Thanks, Jyoti

Re: [SQL] backup and restore

2009-05-09 Thread Jasen Betts
On 2009-05-08, Jyoti Seth wrote: > Hello, > > I have two databases db1 and db2 with the same database structure on > different systems with no network connection. In the first system with the > db1 database user updates the master data. At the end of every day, the user > needs to take the backup

Re: [SQL] backup and restore

2009-05-08 Thread Gerardo Herzig
Jyoti Seth wrote: > Hello, > > I have two databases db1 and db2 with the same database structure on > different systems with no network connection. In the first system with the > db1 database user updates the master data. At the end of every day, the user > needs to take the backup of updated data

Re: [SQL] backup and restore

2009-05-08 Thread Craig Ringer
Craig Ringer wrote: ... something kinda rude, in retrospect. Sorry. Unpleasantness is going around in my immediate environment, and I'm apparently prickly and grumpy. -- Craig Ringer -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.p

Re: [SQL] backup and restore

2009-05-08 Thread Craig Ringer
Wow, I'm impressed. Let me quote part of the message you just replied to with a TOTALLY UNRELATED NEW THREAD: "First: Please don't reply to an existing message to create a new thread. Your mail client copies the replied-to message ID into the References: header, and well-implemented mail clients w

[SQL] backup and restore

2009-05-08 Thread Jyoti Seth
Hello, I have two databases db1 and db2 with the same database structure on different systems with no network connection. In the first system with the db1 database user updates the master data. At the end of every day, the user needs to take the backup of updated data of master tables on db1 and u

Re: [SQL] Backup Database

2007-11-05 Thread Asko Oja
Hi We do it with Skytools. In addition to replication with Londiste it hs lot's of other useful scripts for keeping online database small and healthy. Asko On 10/31/07, Joanne Salerno <[EMAIL PROTECTED]> wrote: > > I have two Postgres databases (7.4 and 8.24) within the same network on > LINUX

Re: [SQL] Backup Database

2007-10-31 Thread Andrew Sullivan
On Wed, Oct 31, 2007 at 10:14:33AM -0700, Joanne Salerno wrote: > I'd like to set up one as a near real-time backup to the operational > database. Is it possible to incorporate a trigger upon update (or > insert) on the operational 8.24 database to initiate an update (or > insert) on the backup

[SQL] Backup Database

2007-10-31 Thread Joanne Salerno
I have two Postgres databases (7.4 and 8.24) within the same network on LINUX platforms. Data sources go to both databases. I'd like to set up one as a near real-time backup to the operational database. Is it possible to incorporate a trigger upon update (or insert) on the operational 8.24 da

Re: [SQL] backup database tablespace with rsync?

2007-10-20 Thread Scott Marlowe
On 10/19/07, chester c young <[EMAIL PROTECTED]> wrote: > postgres A, db 'test', tablespace /pg/test1 > postgres B, db 'test', tablespace /pg/test2 > > tablespace /pg/test1 only has A db 'test' > tablespace /pg/test2 only has B db 'test' > > if > - A and B shut down > - /pg/test1 copied to /pg/test

[SQL] backup database tablespace with rsync?

2007-10-19 Thread chester c young
postgres A, db 'test', tablespace /pg/test1 postgres B, db 'test', tablespace /pg/test2 tablespace /pg/test1 only has A db 'test' tablespace /pg/test2 only has B db 'test' if - A and B shut down - /pg/test1 copied to /pg/test2 - A and B restarted would B db 'test' be running the data that was in

Re: [SQL] backup of a specific schema

2004-08-29 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kenneth Gonsalves wrote: | On Saturday 28 August 2004 06:18 pm, Gaetano Mendola wrote: | | |>| |>| backup/restore |> |>Well, that chapter speak about pg_dump, don't you had the curiosity |>to look at the complete options for that command ? :-) | | | yes

Re: [SQL] backup of a specific schema

2004-08-28 Thread Kenneth Gonsalves
On Saturday 28 August 2004 06:18 pm, Gaetano Mendola wrote: > | > | backup/restore > > Well, that chapter speak about pg_dump, don't you had the curiosity > to look at the complete options for that command ? :-) yes. so i looked in the book from which i was learning postgres. it gave about 3 opt

Re: [SQL] backup of a specific schema

2004-08-28 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kenneth Gonsalves wrote: | On Saturday 28 August 2004 07:46 am, Gaetano Mendola wrote: | |>Kenneth Gonsalves wrote: |> |>>On Friday 27 August 2004 01:17 pm, Michalis Kabrianis wrote: |>> |>>>Kenneth Gonsalves wrote: |>>> |hi, |is there anyway to

Re: [SQL] backup of a specific schema

2004-08-27 Thread Gaetano Mendola
Kenneth Gonsalves wrote: On Friday 27 August 2004 01:17 pm, Michalis Kabrianis wrote: Kenneth Gonsalves wrote: hi, is there anyway to backup/restore a specfic schema in a database? Hi, isn't this what pg_dump --schema=SCHEMA does? thanx - was looking in the wrong place in the manual Which one ? Re

Re: [SQL] backup of a specific schema

2004-08-27 Thread Kenneth Gonsalves
On Friday 27 August 2004 01:17 pm, Michalis Kabrianis wrote: > Kenneth Gonsalves wrote: > > hi, > > is there anyway to backup/restore a specfic schema in a database? > > Hi, > isn't this what pg_dump --schema=SCHEMA does? thanx - was looking in the wrong place in the manual -- regards kg http:/

Re: [SQL] backup of a specific schema

2004-08-27 Thread Riccardo G. Facchini
check pg_dump options, is there --- Kenneth Gonsalves <__> wrote: > hi, > is there anyway to backup/restore a specfic schema in a database? > -- > regards > kg > > http://www.onlineindianhotels.net - fastest hotel search website in > the world > http://www.ootygolfclub.org > > ---

[SQL] backup of a specific schema

2004-08-27 Thread Kenneth Gonsalves
hi, is there anyway to backup/restore a specfic schema in a database? -- regards kg http://www.onlineindianhotels.net - fastest hotel search website in the world http://www.ootygolfclub.org ---(end of broadcast)--- TIP 8: explain analyze is your fr

Re: [SQL] Backup of multiple tables

2003-09-22 Thread Bertrand Petit
On Tue, Sep 23, 2003 at 12:34:00AM +0200, Andreas Joseph Krogh wrote: > > I've never looked at the code-base of pgsql before, but I'll give it a try. > Don't expect anything real soon tho. If you acheive to add the selection of tables to dump, you may at the same time try to add a simila

Re: [SQL] Backup of multiple tables

2003-09-22 Thread Dan Langille
On 23 Sep 2003 at 0:34, Andreas Joseph Krogh wrote: > On Friday 19 September 2003 17:38, Tom Lane wrote: > > > pg_dump can only handle one -t option at a time. It'd make sense to > > allow multiple -t options (likewise -n) but no one's got round to > > improving the code in that particular direct

Re: [SQL] Backup of multiple tables

2003-09-22 Thread Andreas Joseph Krogh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 19 September 2003 17:38, Tom Lane wrote: > Andreas Joseph Krogh <[EMAIL PROTECTED]> writes: > > I usually backup my database with pg_backup without the -t option. But > > now I need to only backup certain tables(say tab1 and tab2), is this >

[SQL] Backup error - Please help

2003-09-22 Thread Senthil Kumar S
Hi,   I have 2 versions of Postgres server 7.2 & 7.3.4 installed on Linux server 7.3. I have not started the Postgres Server 7.2 which is located at /var/library/pgsql.   I am running and using only 7.3.4 located at /usr/local/pgsql.   After I login, I come to the /usr/local/pgsql/bin and the

Re: Fw: [SQL] Backup error - Pls help

2003-09-22 Thread Richard Huxton
On Monday 22 September 2003 13:15, Kumar wrote: > Dear Friend, > I understood what you are saying. But could you pls tell me how to change > the path of the pg_dump so that it should point to > /usr/local/pgsql/bin/pg_dump There's a guide on the Linux Documentation Project here: http://www.tldp.

Fw: [SQL] Backup error - Pls help

2003-09-22 Thread Kumar
<[EMAIL PROTECTED]>; "psql" <[EMAIL PROTECTED]> Sent: Monday, September 22, 2003 5:16 PM Subject: Re: [SQL] Backup error - Pls help > While I issue > which pg_dump it is showed me > /usr/local/pg_dump > > But how to run the backup utility pg_dump to backup my data

Re: [SQL] Backup error - Pls help

2003-09-22 Thread Kumar
ROTECTED]> Sent: Monday, September 22, 2003 3:20 PM Subject: Re: [SQL] Backup error - Pls help > On Monday 22 September 2003 10:01, Kumar wrote: > > Hi, > > > > I have 2 versions of Postgres server 7.2 & 7.3.4 installed on Linux server > > 7.3. I have not started

Re: [SQL] Backup error - Pls help

2003-09-22 Thread Richard Huxton
On Monday 22 September 2003 10:01, Kumar wrote: > Hi, > > I have 2 versions of Postgres server 7.2 & 7.3.4 installed on Linux server > 7.3. I have not started the Postgres Server 7.2 which is located at > /var/library/pgsql. RedHat 7.3 I guess you mean? > I am running and using only 7.3.4 located

[SQL] Backup error - Pls help

2003-09-22 Thread Kumar
Hi,   I have 2 versions of Postgres server 7.2 & 7.3.4 installed on Linux server 7.3. I have not started the Postgres Server 7.2 which is located at /var/library/pgsql.   I am running and using only 7.3.4 located at /usr/local/pgsql.   After I login, I come to the /usr/local/pgsql/bin and th

Re: [SQL] Backup of multiple tables

2003-09-19 Thread Tom Lane
Andreas Joseph Krogh <[EMAIL PROTECTED]> writes: > I usually backup my database with pg_backup without the -t option. But now I > need to only backup certain tables(say tab1 and tab2), is this possible with > pg_dump? I've tried with "pg_dump -t tab1 -t tab2" without success. pg_dump can only ha

Re: [SQL] Backup of multiple tables

2003-09-19 Thread Alexander M. Pravking
On Fri, Sep 19, 2003 at 04:30:57PM +0200, Andreas Joseph Krogh wrote: > > Here's a perl script I used to dump all the tables separately. > > I'm not sure most of options do work there, I didn't test ;-) > > It won't be hard to make it dump certain tables, I think. > > Thanks for your suggestion, b

Re: [SQL] Backup of multiple tables

2003-09-19 Thread Alexander M. Pravking
On Fri, Sep 19, 2003 at 01:54:01PM +0200, Andreas Joseph Krogh wrote: > I usually backup my database with pg_backup without the -t option. But now I > need to only backup certain tables(say tab1 and tab2), is this possible with > pg_dump? I've tried with "pg_dump -t tab1 -t tab2" without success.

[SQL] Backup of multiple tables

2003-09-19 Thread Andreas Joseph Krogh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. I usually backup my database with pg_backup without the -t option. But now I need to only backup certain tables(say tab1 and tab2), is this possible with pg_dump? I've tried with "pg_dump -t tab1 -t tab2" without success. - -- Andreas Joseph K

Re: [SQL] Backup to data base how ?

2002-12-11 Thread Frank Bax
At 10:36 PM 12/11/02, ksql wrote: This is vital for my, please send me an example about like I can make me to support my database with name WAREHOUSE pg_dump -o -c warehouse | gzip > warehouse.gz http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/backup.html

[SQL] Backup to data base how ?

2002-12-11 Thread ksql
This is vital for my, please send me an example about like I can make me to support my database with name WAREHOUSE -- Saludos de Luis, Mi correo: mailto:[EMAIL PROTECTED] _ Do You Yahoo!? La emoción e intensidad

[SQL] Backup of BLOBS

2000-07-03 Thread Brian Powell
Greetings, I have a database that will be quite large that must be backed up nightly. I would like to use pg_dump; however, the problem is that we store binary data as well. Is there a way to backup this up without having to write a program to do it? Thanks, Brian

Re: [SQL] Backup?

2000-06-27 Thread Bryan White
> Hello, > > I had a look for 'backup' on the mailing list archives and strangely > enough didn't find a message containing the word in admin, general > and sql mailing lists... I am sure this must have been asked before, > but still: > > Would it be possible to backup a db by just copying the dir

Re: [SQL] Backup?

2000-06-27 Thread Tom Lane
"Emils Klotins" <[EMAIL PROTECTED]> writes: > Would it be possible to backup a db by just copying the dir struct > under the PG_DATA or must I absolutely use pg_dump? If you ensure nothing at all is happening (as in "shut down the postmaster" --- I would not trust any half measures) then a dump

[SQL] Backup?

2000-06-27 Thread Emils Klotins
Hello, I had a look for 'backup' on the mailing list archives and strangely enough didn't find a message containing the word in admin, general and sql mailing lists... I am sure this must have been asked before, but still: Would it be possible to backup a db by just copying the dir struct un