Re: [SQL] pg_dump: aborting because of server version mismatch

2012-05-11 Thread Adrian Klaver
On 05/02/2012 12:55 PM, Mitesh Shah wrote: Hi, I am trying to create a daily backup cron script but it fails with an error as below: Any pointers to resolve this will be greatly appreciated. Thanks, Mitesh Shah mitesh.s...@stripes39.com *(1) Error:* bash-3.2$

Re: [SQL] pg_dump - 8.3 - schemas

2012-02-16 Thread Adrian Klaver
On 02/16/2012 12:17 PM, Edward W. Rouse wrote: Well, when I do a restore using the created file, reports isn't there. i.e. the select from reports.table gives an error and, from psql, \l doesn't list it and \dn doesn't show it. But that all does work on the original database. What is the error

Re: [SQL] pg_dump - 8.3 - schemas

2012-02-16 Thread Edward W. Rouse
-ow...@postgresql.org [mailto:pgsql-sql- > ow...@postgresql.org] On Behalf Of Adrian Klaver > Sent: Thursday, February 16, 2012 2:39 PM > To: Edward W. Rouse > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] pg_dump - 8.3 - schemas > > On 02/16/2012 11:31 AM, Edward W. Rous

Re: [SQL] pg_dump - 8.3 - schemas

2012-02-16 Thread Adrian Klaver
On 02/16/2012 11:31 AM, Edward W. Rouse wrote: To answer the second question first, yes; both as the same user. pg_dump -v -f $bkfile -F c -U $USER $DATABASE So how are you determining that only the public schema is being dumped? One thing to check is the search_path setting in postgresql.con

Re: [SQL] pg_dump - 8.3 - schemas

2012-02-16 Thread Edward W. Rouse
@postgresql.org > Subject: Re: [SQL] pg_dump - 8.3 - schemas > > On 02/16/2012 10:59 AM, Edward W. Rouse wrote: > > I am working with a database set up by someone else. They set it up > so that > > most tables are in the public schema, but they also have a reports &

Re: [SQL] pg_dump - 8.3 - schemas

2012-02-16 Thread Adrian Klaver
On 02/16/2012 10:59 AM, Edward W. Rouse wrote: I am working with a database set up by someone else. They set it up so that most tables are in the public schema, but they also have a reports schema; database.public.tables and database.reports.tables. If I do a pg_dump of the database, I only get

Re: Fw: Re: [SQL] pg_dump not correctly saving schema with partitioned tables?

2012-01-31 Thread Tom Lane
chester c young writes: >> here is a test case: [ slightly less messed-up test case for anyone who wants to duplicate this: ] create schema s1; create schema s2; create table s1.t1( c1 bigserial primary key, c2 text ); create table s2.t1( c1 bigserial primary key ) inherits( s1

Fw: Re: [SQL] pg_dump not correctly saving schema with partitioned tables?

2012-01-31 Thread chester c young
> From: chester c young > Subject: Re: [SQL] pg_dump not correctly saving schema with partitioned > tables? > To: "Tom Lane" > Date: Tuesday, January 31, 2012, 5:40 PM > --- On Tue, 1/31/12, Tom Lane > wrote: > > > From: Tom Lane > > Subject:

Re: [SQL] pg_dump not correctly saving schema with partitioned tables?

2012-01-31 Thread Tom Lane
chester c young writes: > have database with many partitions. each partition table has its own primary > key sequence. >Column || Modifiers > ---++-- > uno_id|| not n

Re: [SQL] pg_dump : problem with grant on table columns

2011-11-15 Thread Craig Ringer
On Nov 15, 2011 9:46 PM, "Brice André" wrote: > > Hello, > > I sometimes define some access rights on table columns instead of whole table. Everything works fine except when I perform a dump. > > When I dump a databse that contains such access rights, the pg_dump utility generates commands like th

Re: [SQL] pg_dump more than one table in one command?

2008-10-06 Thread Harold A. Giménez Ch.
Looks like you are right, Scott. Thanks! I wasn't in Postgres land back then. On Mon, Oct 6, 2008 at 5:48 PM, Scott Marlowe <[EMAIL PROTECTED]>wrote: > On Mon, Oct 6, 2008 at 3:24 PM, Harold A. Giménez Ch. > <[EMAIL PROTECTED]> wrote: > > > > On Mon, Oct 6, 2008 at 5:02 PM, Emi Lu <[EMAIL PROTECT

Re: [SQL] pg_dump more than one table in one command?

2008-10-06 Thread Scott Marlowe
On Mon, Oct 6, 2008 at 3:24 PM, Harold A. Giménez Ch. <[EMAIL PROTECTED]> wrote: > > On Mon, Oct 6, 2008 at 5:02 PM, Emi Lu <[EMAIL PROTECTED]> wrote: >> >> Good morning, >> >> Under postgreSQL 8.0, could someone tell me how to pg_dump more than one >> tables at the same time please? >> >> I tried

Re: [SQL] pg_dump more than one table in one command?

2008-10-06 Thread Harold A. Giménez Ch.
You must specify --table (or -t) once for each of the tables, ie: pg_dump -h machineName -U username --inserts --column-inserts --file=dump.sql --table=t1 --table=t2 . . --table=tN -d databaseName ; -t t1 -t t2 -t t3 On Mon, Oct 6, 2008 at 5:02 PM, Emi Lu <[EMAIL PROTECTED]> wrote: > Go

Re: [SQL] pg_dump in windows

2008-09-26 Thread James Kitambara
  Hello Ramasubramanian,   You don't have to worry about the password. You need to enter the password of the person doing the backup. One the password is provided the backup is executed.   I think that anyone executing the pg_dump must be a Super user.   Best Regards,   James Kitambara.  

Re: [SQL] pg_dump in windows

2008-09-19 Thread Richard Huxton
Ramasubramanian wrote: > HI all, I am facing a problem while taking a back up in windows. It > is asking for a password while using pg_dump. Why it is asking for a > password ?(it is not asking password in linux) Give some details > about fe_sendauth in postgres . How i can avoid asking password in

Re: [SQL] pg_dump and "could not identify an ordering operator for type name"

2008-08-31 Thread Martin Marques
Gerardo Herzig escribió: Hi dudes. Im facing a problem with pg_dump, pg_dump: SQL command failed pg_dump: Error message from server: ERROR: could not identify an ordering operator for type name HINT: Use an explicit ordering operator or modify the query. pg_dump: The command was: SELECT t.tabl

Re: [SQL] pg_dump using SQL

2008-03-19 Thread Preston Landers
Yusnel Rojas Garc?a([EMAIL PROTECTED])@2008.03.18 11:45:03 -0800: > Hi everyone > > Is there any way to do what pg_dump does?, I mean, get the structure of a > table in a database (ex: CREATE TABLE ...) > If you want to programmaticly discover the elements in a database schema then you can alway

Re: [SQL] pg_dump using SQL

2008-03-18 Thread Tom Lane
"Phillip Smith" <[EMAIL PROTECTED]> writes: >> Is there any way to do what pg_dump does?, I mean, get the structure of a >> table in a database (ex: CREATE TABLE ...) > Turn Query Logging on in postgresql.conf then see what queries are executed > by pgAdmin or similar when you run it? But note th

Re: [SQL] pg_dump using SQL

2008-03-18 Thread Phillip Smith
> Is there any way to do what pg_dump does?, I mean, get the structure of a table in a database (ex: CREATE TABLE ...) Turn Query Logging on in postgresql.conf then see what queries are executed by pgAdmin or similar when you run it? THINK BEFORE YOU PRINT - Save paper if you don't really need t

Re: [SQL] pg_dump question

2007-10-05 Thread Erik Jones
On Oct 5, 2007, at 11:58 AM, Judith wrote: Hello every body!! I have a quesyion respect pg_dump... I need to backup the db structure, I suposse that I do with pg_dump -s, but I want to restore but just with some tables with the db catalogues, can I do this?, I mean, restore al

Re: [SQL] pg_dump?

2007-05-15 Thread Andrew Sullivan
You want to look at the pg_dump command. A On Mon, May 14, 2007 at 03:48:17PM -0700, Richard Dunne wrote: > PostgreSQL begginer. Whats the best way of exporting(dumping) a > database/table/view/query to a file? > I am using PostgreSQL v 8.2. I am starting postgres server with > C:\WINDOWS\sys

Re: [SQL] pg_dump?

2007-05-14 Thread Paul Lambert
Richard Dunne wrote: PostgreSQL begginer. Whats the best way of exporting(dumping) a database/table/view/query to a file? I am using PostgreSQL v 8.2. I am starting postgres server with C:\WINDOWS\system32\net.exe start pgsql-8.2, (start service) C:\postgresql-8.2.3-1\bin\psql.exe -h localhos

Re: [SQL] pg_dump inquiry

2007-03-01 Thread Joe
On Thu, 2007-03-01 at 12:30 -0300, Osvaldo Rosario Kussama wrote: > http://www.postgresql.org/docs/8.2/interactive/app-pgdump.html > "Multiple tables can be selected by writing multiple -t switches. Also, > the table parameter is interpreted as a pattern according to the same > rules used by psql

Re: [SQL] pg_dump inquiry

2007-03-01 Thread Osvaldo Rosario Kussama
Karthikeyan Sundaram escreveu: Hi, I have to dump only 10 tables out of 100 tables. In the pg_dump utility given by postgres there is an option called -t followed by table name. In that option, if I give more than 1 table, it's not accepting. How can I get the dump in one stroke fo

Re: [SQL] pg_dump fails (timestamp out of range)

2007-02-26 Thread T E Schmitz
Andrew Sullivan wrote: On Mon, Feb 26, 2007 at 11:05:08AM +, T E Schmitz wrote: I can't thank you enough for the above advice. The test above identified 3 records and once they were removed I was able to dump the DB. You'll be wanting to make sure your hardware is fixed after this, don't

Re: [SQL] pg_dump fails (timestamp out of range)

2007-02-26 Thread Andrew Sullivan
On Mon, Feb 26, 2007 at 11:05:08AM +, T E Schmitz wrote: > I can't thank you enough for the above advice. The test above identified > 3 records and once they were removed I was able to dump the DB. You'll be wanting to make sure your hardware is fixed after this, don't forget, or you'll end

Re: [SQL] pg_dump fails (timestamp out of range)

2007-02-26 Thread T E Schmitz
Tom Lane wrote: T E Schmitz <[EMAIL PROTECTED]> writes: pg_dump: ERROR: timestamp out of range pg_dump: SQL command to dump the contents of table "server_hit_bin" failed: PQendcopy() failed. You should treat this as a corrupt-data exercise: you need to identify and fix (or delete) the offen

Re: [SQL] pg_dump fails (timestamp out of range)

2007-02-22 Thread Tom Lane
T E Schmitz <[EMAIL PROTECTED]> writes: > However, I am stalled because pg_dump fails with the following error: > pg_dump: ERROR: timestamp out of range > pg_dump: SQL command to dump the contents of table "server_hit_bin" > failed: PQendcopy() failed. You should treat this as a corrupt-data exe

Re: [SQL] pg_dump

2006-09-05 Thread Tom Lane
"M. Santosa" <[EMAIL PROTECTED]> writes: > I've install postgres in linux. > but pg_dump its not working at all. > -bash-3.00$ psql -l > ERROR: relation "pg_catalog.pg_user" does not exist IIRC, this is a symptom of selinux having interfered with initdb. Get a newer copy of the selinux policy pac

Re: [SQL] pg_dump

2006-09-05 Thread Andrew Sullivan
On Tue, Sep 05, 2006 at 02:22:29PM +0700, M. Santosa wrote: > and if i execute the psql with list database option, the result is error > > -bash-3.00$ psql -l > ERROR: relation "pg_catalog.pg_user" does not exist This looks to me like you have more than one postmaster installed, and you've got

Re: [SQL] pg_dump and diffrent sizes

2006-03-03 Thread Scott Marlowe
On Fri, 2006-03-03 at 14:10, Maciej Piekielniak wrote: > Hello pgsql-sql, > > I dump db with pg_dump v.8.1.3 on database postgresql server 7.4.7. > Data directory with my db on pg 7.4.7 had 1,8GB and > file with dump had 2,7GB. > Database have blob fields. > > When I restore db on pg 8.1 - data d

Re: [SQL] pg_dump

2005-11-15 Thread Oliver Elphick
On Fri, 2005-11-11 at 17:04 -0600, Judith Altamirano Figueroa wrote: > Hi > > how could I restore a db if I did next: > > pg_dump -Z 9 soi > $DESTINO/soi.bkp Since you don't specify any dump format, your dump should be plain text and is compressed with gzip, so the restore command is going t

Re: [SQL] pg_dump without data

2005-05-06 Thread Scott Marlowe
On Fri, 2005-05-06 at 04:14, Kenneth Gonsalves wrote: > how do i get a dump of a postgresql database without the data? pg_dump -s for the schema pg_dumpall -g for the globals, like usernames and all. ---(end of broadcast)--- TIP 4: Don't 'kill -9'

Re: [SQL] pg_dump without data

2005-05-06 Thread Philip Hallstrom
how do i get a dump of a postgresql database without the data? % pg_dump --help pg_dump dumps a database as a text file or to other formats. Usage: pg_dump [OPTION]... [DBNAME] . -s, --schema-onlydump only the schema, no data -philip ---(end of broadcast

Re: [SQL] pg_dump/pg_restore question

2004-08-23 Thread Richard Huxton
Worik wrote: Freinds I am new to this list, and this is my first message. I hope this is the correct forum, and the question not too stupid/simple. I have a database on a debian stable system... dpkg -l postgresql [snip] ii postgresql 7.2.1-2woody5 Object-relational SQL database, descended f

Re: [SQL] pg_dump/pg_restore question

2004-08-22 Thread Iain
Hi Worik, I can't address the specifics of your problem but I'll give you an example of I do it on a 7.4 db. I dunno if all options are available on your version. To get the backup: pg_dump --format=c -v DBNAME > FILENAME.dump To restore you have to create a new DB (drop the old one first if n

Re: [SQL] pg_dump "feature"

2003-07-16 Thread Viorel Dragomir
m: "Tom Lane" <[EMAIL PROTECTED]> To: "Viorel Dragomir" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, July 16, 2003 5:29 PM Subject: Re: [SQL] pg_dump "feature" > "Viorel Dragomir" <[EMAIL PROTECTED]> writes: > >

Re: [SQL] pg_dump "feature"

2003-07-16 Thread Tom Lane
"Viorel Dragomir" <[EMAIL PROTECTED]> writes: > In 7.3.x the pg_dump accepts the password only from stdin. The user must en= > ter his password. > It's a feature or a bug, because i can't see any logic in this behaviour. It's a feature ... or at least an intentional change. If you want to keep yo

Re: [SQL] pg_dump problem

2003-01-20 Thread Bhuvan A
> mv camper.dump20020116 camper_bak/ > > The error I get is :: > > mv: camper.dump20020116: Value too large for defined data type > It may not be a postgresql problem. It may be due to your filesystem. Try the documentation or mailing list of your filesystem. regards, bhuvaneswaran ---

Re: [SQL] pg_dump problem

2003-01-16 Thread Tomasz Myrta
Rudi Starcevic wrote: Hi, After doing a pg_dump on a database I'm unable to access the file. My command is simply 'mv' :: mv camper.dump20020116 camper_bak/ The error I get is :: mv: camper.dump20020116: Value too large for defined data type Strange. It seems to be saying the file I created

Re: [SQL] pg_dump, no inserts but \copy?

2002-11-08 Thread Bruce Momjian
There is no way to force INSERT unless you are telling it to do that somehow. Are you perhaps using -d. That causes inserts too? What is your command line for the dump? --- Joost Witteveen wrote: > I remember the pg_dump

Re: [SQL] pg_dump and sequences

2002-07-24 Thread Achilleus Mantzios
On Wed, 24 Jul 2002, Tom Lane wrote: > Achilleus Mantzios <[EMAIL PROTECTED]> writes: > >> It seems that pg_dump -t "tablename" dumps correctly the sequence of a > >> table's column,when the column is named after "id". > > > I meant "when ONLY" the column is named after "id", > > Yeah, you're

Re: [SQL] pg_dump and sequences

2002-07-24 Thread Tom Lane
Achilleus Mantzios <[EMAIL PROTECTED]> writes: >> It seems that pg_dump -t "tablename" dumps correctly the sequence of a >> table's column,when the column is named after "id". > I meant "when ONLY" the column is named after "id", Yeah, you're right. I'm hoping to see a better answer in 7.3, bu

Re: [SQL] pg_dump and sequences

2002-07-23 Thread Achilleus Mantzios
On Tue, 23 Jul 2002, Achilleus Mantzios wrote: Just a correction > Hi, i am using postgreSQL 7.2.1 on a redhat 7.2 (kernel > 2.4.9-31,glibc-2.2.4-24). > > It seems that pg_dump -t "tablename" dumps correctly the sequence of a > table's column,when the column is named after "id". >

Re: [SQL] pg_dump bug? (7.1)

2001-04-23 Thread Tom Lane
Cedar Cox <[EMAIL PROTECTED]> writes: > When I try to run pg_dump I get a segmentation fault. This only seems to > happen if the PGDATABASE environment variable is set and I don't supply > the database name on the command line. Fixed. regards, tom lane -

Re: [SQL] pg_dump error - further information

2001-01-16 Thread Johann Spies
On Mon, Jan 15, 2001 at 08:36:46PM -0500, Tom Lane wrote: > I would guess that this means there is a file named "pgdump_oid" hanging > around in the database directory, no doubt leftover from some previous > pg_dump cycle. Manually removing the file should get you up and running > again. However

Re: [SQL] pg_dump error

2001-01-16 Thread Johann Spies
On Mon, Jan 15, 2001 at 08:36:46PM -0500, Tom Lane wrote: > Tatsuo Ishii <[EMAIL PROTECTED]> writes: > Can not create pgdump_oid table. Explanation from backend: 'ERROR: > cannot create pgdump_oid > > Is there a way to repair this? > > I would guess that this means there is

Re: [SQL] pg_dump error

2001-01-15 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: Can not create pgdump_oid table. Explanation from backend: 'ERROR: cannot create pgdump_oid Is there a way to repair this? I would guess that this means there is a file named "pgdump_oid" hanging around in the database directory, no d

Re: [SQL] pg_dump error

2001-01-15 Thread Tatsuo Ishii
> >Can not create pgdump_oid table. Explanation from backend: 'ERROR: > >cannot create pgdump_oid > > > >Is there a way to repair this? > > > > If there was an earlier crash while running pg_dump, the table may already > exist. If so, try deleting it. Also, can you confirm that the username > un

Re: [SQL] pg_dump error

2001-01-15 Thread Philip Warner
At 22:13 15/01/01 +0200, Johann Spies wrote: > >Can not create pgdump_oid table. Explanation from backend: 'ERROR: >cannot create pgdump_oid > >Is there a way to repair this? > If there was an earlier crash while running pg_dump, the table may already exist. If so, try deleting it. Also, can you

Re: [SQL] pg_dump Error

2000-12-22 Thread Tom Lane
Najm Hashmi <[EMAIL PROTECTED]> writes: > while trying to dump db shcema and content, I am getting the > following error: > [najm@localhost najm]$ pg_dump -D fliprdb > flipr.sql > PQgetvalue: ERROR! tuple number 0 is out of range 0..-1 > Segmentation fault (core dumped) Hmm, look

Re: [SQL] pg_dump

2000-07-25 Thread Tom Lane
sathya priya <[EMAIL PROTECTED]> writes: > when dump the database it throw > "getTables(): relation 'ordermaster': cannot find > function with oid 1655 for trigger > RI_ConstraintTrigger_2017354 " I think this must be another variant of the 6.5-pg_dump-with-7.0-database problem. There's no err

Re: [SQL] pg_dump problem

2000-06-27 Thread drfrog
Ed Loehr wrote: > > Graham Vickrage wrote: > > > > I am trying to backup a production database running on v6.5 and restore it > > on our test machine running v6.5. > > > > The largest table has about 750,000 rows, the other 5 tables are very small > > approx 100 rows. > > > > When I try to restor

Re: [SQL] pg_dump problem

2000-06-26 Thread Ed Loehr
Graham Vickrage wrote: > > I am trying to backup a production database running on v6.5 and restore it > on our test machine running v6.5. > > The largest table has about 750,000 rows, the other 5 tables are very small > approx 100 rows. > > When I try to restore the database using "psql -e dat