473,749 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redundant data in postgres

1 New Member
Hye,

I'm quite new in postgres.I have 2 problems that i do not how to solve. Hope somebody can help me.

1. Although i put my zone field is unique, postgres sometimes redundant my
data automatically.E xample :
-----------------------------------
rundate | zone
-----------------------------------
01/30/2007 | #01
-----------------------------------
01/30/2007 | #01
-----------------------------------

2. Why does when i make a select statement like this
'select runndate,zone from tb_team_arch where rundate='30 January 2007' , postgres give me data like this
-----------------------------------
rundate | zone
-----------------------------------
01/30/2007 | #01
-----------------------------------
11/02/2007 | #01
-----------------------------------

This result make my system goes wrong.
I really hope somebody can help me
Thank you
Feb 13 '07 #1
1 2049
michaelb
534 Recognized Expert Contributor
This is highly unlikely that Postgres would allow a duplicate data on a unique field.
Could you review the table definition?
If you're not sure you can post it here. If you don't have any management tools, then the easiest way to get the table schema and constraints is to open the psql session and enter this command:

Expand|Select|Wrap|Line Numbers
  1. \d table_name
  2. -- or
  3. \d+ table_name
  4.  
Feb 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2071
by: gordy | last post by:
edit: this came out longer than I thought, any comments about anything here is greatly appreciated. thank you for reading My system stores millions of records, each with fields like firstname, lastname, email address, city, state, zip, along with any number of user defined fields. The application allows users to define message templates with variables. They can then select a template, and for each variable in the template, type in a...
0
1920
by: Simon Ashford | last post by:
I'm not going to bore you with the what's, why's and where for's and I'm not looking for the suggestion of upgrade the other server. I have a server running Postgres 7.3.2 and need to transfer the whole database (structure, data, etc but not permissions) to another server running Postgres 7.0.2. I have tried this command with pg_dump on the 7.3.2 install to make a backup of the data an a plain text file:
0
1696
by: news.paradise.net.nz | last post by:
My database appears to be a little corrupted, so far it's running along 99% ok, but i am getting some strange results. Primarily i can't back it up because of the following error. Similar errors occur when I try to drop a table. boo:/var/backups# su postgres pg_dump rj > /var/backups/rj.dump pg_dump: FATAL 2: open of /var/lib/postgres/data/pg_clog/0004 failed: No such file or directory pg_dump: lost synchronization with server,...
2
4357
by: phantom | last post by:
Hi all. We have a production data source running postgres for reporting/DSS we are thinking on building a warehouse, wherein data would be transferred from postgres to the warehouse. The datawarehouse would be implemented in oracle as the plans stand. I am thereby looking for a solution to relay data between the two, although the techdocs do mention a way to generate interbase sql and carry out the migration, not sure if that is the...
3
1883
by: Vivek Khera | last post by:
I have some historic data that I want to analyze. To do this I set up postgres on a spare box I picked up for cheap, which just lucked into having tons of RAM (1.5G). I set up postgres to use 10000 buffers, and recompiled the kernel to allow 2Gb data size limit per process. Since this is historical data, I'm actually merging a couple of dumps that span the time range. I've dealt with eliminating any conflicting data (ie, clashing...
2
306
by: Daniel Heiserer | last post by:
Hi, I want to administer files with postgres. When I "import" a file to postgres I also submit certain atributes the file has. Such as filetype or specific properties I know about the file (not the standard stuff like the OS knows about the file as date,and size) I want that postgres then copies the file to a save place and write and read protects it. Once I query for certain attributes I submitted before
18
5152
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra observations I've recently made. The core of the problem is that Postgres is filling up my hard drive with swap files at the rate of around 3 to 7 GB per week (that's Gigabytes not Megabytes) . At this rate it takes roughly two months to fill up my 40...
1
1877
by: CSN | last post by:
My permissions on pg's data dir got changed. Largely just curious (since pg appears to be working fine after changing as below), is this what they should be? chown -R postgres.nobody data chmod -R 0700 data
0
2705
by: NM | last post by:
Hello, I've got a problem inserting binary objects into the postgres database. I have binary objects (e.g. images or smth else) of any size which I want to insert into the database. Funny is it works for files larger than 8000 Bytes. If a file is less than 1000 Bytes I get the following message: Error message: --invalid input syntax for type oid: "\074\077......";
0
8996
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
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
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...
1
9333
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,...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
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
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
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.