Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYBPy-0008HO-Ox for pgadmin-hackers@arkaria.postgresql.org; Mon, 30 Jan 2017 12:50:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cYBPy-00043W-Cp for pgadmin-hackers@arkaria.postgresql.org; Mon, 30 Jan 2017 12:50:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cYBPk-0003ob-LM for pgadmin-hackers@postgresql.org; Mon, 30 Jan 2017 12:50:32 +0000 Received: from mail-io0-x235.google.com ([2607:f8b0:4001:c06::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cYBPf-00014B-S7 for pgadmin-hackers@postgresql.org; Mon, 30 Jan 2017 12:50:31 +0000 Received: by mail-io0-x235.google.com with SMTP id v96so9775519ioi.0 for ; Mon, 30 Jan 2017 04:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oBRu/RffzAVWWAez+0VGRWKdHLFud+scSa+JgTLK/e0=; b=ewunSRrAba8o04D9KsQ/sYF7tEzEy88/DoAPCFlqm9Ku1JyqBM2izCoNYJfhY27vLk S3YcDGpeHs1rrn5JQunY31zSbSDhIMJnz7OZR7TyRQY0awsBkcgvaZLOfCD5qqO9fBpj ds8L56jsECEQAEj4THzn9e2bvNtz5JGXKzhG9CrOtem5kl1Pa9gmutm3/JcJyF6hosdU U4UXOCgn307I+EvgL5coujkjcYu+yrceDN90DPkecudV8H9RnmXn32waUtdHZh2I5VoS BUS0mLkVu+fhdbaNtsK8GzYoVWjB8UkycLsFdwCR304hrzTHlfiHjUwRe1P6x/9Dc9WS XGSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oBRu/RffzAVWWAez+0VGRWKdHLFud+scSa+JgTLK/e0=; b=UTm/yGG5t3+IcoV/co/049s4ow/8D6wSQWObaC5IUwioG5CgV3C0duZaw09305qVH8 Hog7O66mozpc0pr23XEypc7Qzl4AozyL1MudIeEXIrxWONai9BXw+8l+x1v4L8V5neZL lt20t5bN6DSS7fQPJvF+n9ceypIxgSVmKcDFUWQZDf6apJCOiqicsXkuq58eD8PiQ9tc bQTx8HGCSHhE/TyhabucBcA3ogZJjY7HGr0KbmJPD68I2YL1zE0b1yDURlzglh+kZTIo k1EGHyKyxpk4M1nKazoyqrRA4qRBDcxPkcrEDSIk4R2K1lfXnVzF5cEXG3tclq41BE2s dNDA== X-Gm-Message-State: AIkVDXI1t5UPii15jUeRDGKjD2PcPQytOu5E7ZlE8E54FrpWRWx9OdkJd03q+Ti2CNuwZyfxMELKe8GwtfKeKA== X-Received: by 10.107.11.27 with SMTP id v27mr19259808ioi.145.1485780625826; Mon, 30 Jan 2017 04:50:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.224.198 with HTTP; Mon, 30 Jan 2017 04:50:25 -0800 (PST) In-Reply-To: References: From: Dave Page Date: Mon, 30 Jan 2017 12:50:25 +0000 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM 2069 - Wrong tablespace displayed in table properties To: Khushboo Vashi Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi Can you rebase this please? Thanks. On Fri, Jan 27, 2017 at 11:53 AM, Khushboo Vashi wrote: > Hi, > > Please find the attached updated patch. > > Thanks, > Khushboo > > On Fri, Jan 20, 2017 at 5:31 PM, Dave Page wrote: >> >> On Fri, Jan 13, 2017 at 6:41 AM, Khushboo Vashi >> wrote: >> > Hi, >> > >> > Please find the attached patch to fix the RM 2069 - Wrong tablespace >> > displayed in table properties. >> > >> > When the table is created without a tablespace, the "pg_default" >> > tablespace >> > gets selected rather than the default tablespace (the current database >> > tablespace). >> > So, this issue has been fixed. >> >> Unfortunately more work is required. I started hacking on it (see >> attached), but there is more effort needed and I'm out of time. >> Specifically: >> >> - We need to remove 'pg_default' as the default tablespace when >> creating objects. Let's have no default, and let PG automatically pick >> the right tablespace, unless the user specifically overrides it. My >> updated patch removes that default, and fixes some of the SQL to >> handle it. >> > Done >> >> - Matviews don't list the correct tablespace in their properties list. >> > Done >> >> - Unique constraints ignore the tablespace option if the user selects >> pg_default, even if the database's default is something different. >> > Done >> >> So I think to complete this we need to review all objects that use >> tablespaces (databases, tables, matviews, indexes, index-backed >> constraints) and ensure: >> > Done >> >> - No default tablespace is selected when creating an object. >> > Done >> >> - If the user selects a tablespace, the CREATE SQL must handle it >> properly. Similarly, if they leave it to the default. >> > Done >> >> - The Properties views must display the actual tablespace in use, >> whether it is specific to the object, or the database default. >> > Done >> >> Thanks. >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers