Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0020371 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2012-04-27 12:31 | 2012-04-27 14:10 | |||
Reporter | mirurita | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | high | Resolution | no change required | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | PostgreSQL | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0020371: Unique constraint in PostgreSQL not working with nullable columns | |||||||
Description | unique constraints containing nullable columns are not working as expected in PostgreSQL. http://www.postgresql.org/docs/8.1/static/ddl-constraints.html [^] "In general, a unique constraint is violated when there are two or more rows in the table where the values of all of the columns included in the constraint are equal. However, null values are not considered equal in this comparison. That means even in the presence of a unique constraint it is possible to store duplicate rows that contain a null value in at least one of the constrained columns. This behavior conforms to the SQL standard, but we have heard that other SQL databases may not follow this rule. So be careful when developing applications that are intended to be portable." | |||||||
Steps To Reproduce | [PostgreSQL] c_conversion_rate_document table has the following unique constraint: constraint c_conversionratedoc_once UNIQUE (c_currency_id, c_currency_id_to, c_invoice_id, fin_payment_id, aprm_finacc_transaction_v_id) 1) Create a new Sales Invoice 2) Go to Exchange Rates tab 3) Create new Exchange Rate (EUR --> EUR) - Currency: EUR - To Currency: EUR 4) Create again the same exchange rate for EUR --> EUR - Currency: EUR - To Currency: EUR 5) The unique constraint defined should not allow to create the record in step 4 6) The system allows to create a duplicate exchange rate. | |||||||
Proposed Solution | Support more complex constraints. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0048148) alostale (manager) 2012-04-27 14:10 |
Unique constraints in PostgreSQL do behave as they are expected to behave in PG (which might be differently than in Oracle). |
Issue History | |||
Date Modified | Username | Field | Change |
2012-04-27 12:31 | mirurita | New Issue | |
2012-04-27 12:31 | mirurita | Assigned To | => alostale |
2012-04-27 12:31 | mirurita | Modules | => Core |
2012-04-27 12:33 | mirurita | Relationship added | related to 0020142 |
2012-04-27 14:10 | alostale | Note Added: 0048148 | |
2012-04-27 14:10 | alostale | Status | new => closed |
2012-04-27 14:10 | alostale | Resolution | open => no change required |
Copyright © 2000 - 2009 MantisBT Group |