Hello,

Foreign Key dialog shows deleted attributes in combo box "Referencing". In "Local column" combo box these are hidden. Attaching picture.

Steps to reporduce:
1. Go to table having deleted attributes, pick constraints
2. Right click, New Object, New Foreign Key
3. Check the values of "Referencing" combo box

pgAdmin 1.14.0 RC1
OS: Windows XP SP3
PG: Version string    PostgreSQL 8.3.15, compiled by Visual C++ build 1400

Fix is also attached.

Thank you for the pgAdmin.

--
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050

<<attachment: pgadmin_deleted_attributes.PNG>>

>From 5e71a6b9da8f8e2ce3d37094b7f7056a928bfa7c Mon Sep 17 00:00:00 2001
From: Julius Tuskenis <jul...@nsoft.lt>
Date: Tue, 30 Aug 2011 19:06:45 +0300
Subject: [PATCH] Fixed Combobox for Reference columns showing dropped columns
 in FK dialog

---
 pgadmin/dlg/dlgForeignKey.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pgadmin/dlg/dlgForeignKey.cpp b/pgadmin/dlg/dlgForeignKey.cpp
index c028740..83bc763 100644
--- a/pgadmin/dlg/dlgForeignKey.cpp
+++ b/pgadmin/dlg/dlgForeignKey.cpp
@@ -255,6 +255,7 @@ void dlgForeignKey::OnSelChangeRef(wxCommandEvent &ev)
 	                 wxT("   AND nspname=") + qtDbString(nsp) +
 	                 wxT("\n   AND relname=") + qtDbString(tab) +
 	                 wxT("\n   AND attnum > 0\n")
+	                 wxT("\n   AND NOT attisdropped\n")
 	                 wxT("\n ORDER BY attnum"));
 	if (set)
 	{
-- 
1.7.6.msysgit.0

-- 
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Reply via email to