By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,066 Members | 1,841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,066 IT Pros & Developers. It's quick & easy.

Redundant data in postgres

P: 1
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.Example :
-----------------------------------
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
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 534
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

Post your reply

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