473,796 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pg_dump incorrect sequence value

Hi,

I had dumped data using the command:

pg_dump -U dbowner dbname -a -t table -f table-data.sql

two tables (e.g. table1, table2).

In the first table - the correct sequence was set as can
be seen at the end of the dump file:

.....
SELECT pg_catalog.setv al ('table1_id_seq ', 20, true);

but in the second table - the sequence was incorrect:

....
SELECT pg_catalog.setv al ('table2_id_seq ', 1, true);

Question:
How do I correct this so that dumping data sets the
correct sequence value?

Using:
Red Hat 8
Linux 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 GNU/Linux

postgresql-libs-7.3.3-1PGDG
postgresql-tcl-7.3.3-1PGDG
postgresql-server-7.3.3-1PGDG
postgresql-7.3.3-1PGDG
postgresql-libs-7.2.2-1
postgresql-contrib-7.3.3-1PGDG

TIA,

Joshua

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #1
1 3066
"Joshua L. San Juan" <jo********** @q-linux.com> writes:
but in the second table - the sequence was incorrect:
SELECT pg_catalog.setv al ('table2_id_seq ', 1, true);


It seems fairly hard to believe that what pg_dump emitted was not the
actual state of the sequence object. Why do you think this is incorrect?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3496
by: Marcin Gil | last post by:
Hi! I dumped a DB using pg_dump from version 7.2.3 and tried to read it into DB with psql|pg_restore of version 7.3.3. I got an error 'pg_atoi: zero-length string' during the creation of relations. Don't know what to do with it. TIA -- Marcin "Dentharg" Gil
0
4902
by: Martin Hart | last post by:
Hi, postgresql 7.4beta4 on linux and postgresql 7.3.4 on linux We have a database that we routinely backup using "pg_dump -a" We have to do this (dump the data only) because of various characteristics of the database (e.g. the dump file tries to create fks to tables that it hasn't created yet if we export schema + data).
7
4839
by: Ed L. | last post by:
We are seeing what looks like pgsql data file corruption across multiple clusters on a RAID5 partition on a single redhat linux 2.4 server running 7.3.4. System has ~20 clusters installed with a mix of 7.2.3, 7.3.2, and 7.3.4 (mostly 7.3.4), 10gb ram, 76gb on a RAID5, dual cpus, and very busy with hundreds and sometimes > 1000 simultaneous connections. After ~250 days of continuous, flawless uptime operations, we recently began...
1
2149
by: andrew | last post by:
Table A has a CHECK constraint testing boolean function F. Function F has a SELECT from Table A. In my manual build script, I create the table, then the function, and then at the very end of the script to I do an ALTER TABLE ADD CHECK. pg_dump appears to put the CHECK constraint as a clause in the CREATE TABLE statement. Now I'm in trouble, because whichever of the table or the function is read in first by pg_restore refers to an object...
4
3817
by: jack turer | last post by:
I have a database in pgsql (7.3.2) on redhat 9. When I try a 'pg_dump mydb' to back up the database, I get: pg_dump: could not find namespace with OID 2200 Verbose version is: -bash-2.05b$ pg_dump -v mydb | more pg_dump: saving database definition pg_dump: reading namespaces pg_dump: reading user-defined types
1
3296
by: Ben-Nes Michael | last post by:
Hello Im getting strange errors when restoring data from pg_dump files: ERROR: duplicate key violates unique constraint "products_pkey" CONTEXT: COPY products, line 1: "98 Super Pak Ruby j&aacute;t&eacute;k J-0001 1502450E Szuper Pok&eacute;mon aj&aacute;nd&eacute;kcso..." ERROR: duplicate key violates unique constraint "attributes_pkey" CONTEXT: COPY attributes, line 1: "2 Width" ERROR: duplicate key violates...
1
1180
by: linhluong | last post by:
Hi everyone, I need some help Can I dump specifc table and still get the actual sequence for it. Somehow when I go pg_dump -Fc -t <table name> -D <dbname> it only give me the for that table create table text all the indexes
0
1704
by: David Suela Fernández | last post by:
Hi! I have a debian woody with postgresql 7.4.2. When i try to use pg_dump i get the next error: pg_dump: saving encoding pg_dump: saving database definition 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 usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding, datpath FROM pg_database WHERE...
6
8602
by: trevor | last post by:
Incorrect values when using float.Parse(string) I have discovered a problem with float.Parse(string) not getting values exactly correct in some circumstances(CSV file source) but in very similar circumstances(XML file source) and with exactly the same value it gets it perfectly correct all the time. These are the results I got, XML is always correct, CSV are only incorrect for some of the values (above about 0.01) but always gives the...
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.