Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcuBU-0007DF-Et for pgsql-admin@arkaria.postgresql.org; Fri, 28 Dec 2018 15:36:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gcuBT-0000xh-3k for pgsql-admin@arkaria.postgresql.org; Fri, 28 Dec 2018 15:36:23 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcuBS-0000xa-Q1 for pgsql-admin@lists.postgresql.org; Fri, 28 Dec 2018 15:36:22 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gcuBP-0004qv-Lb for pgsql-admin@postgresql.org; Fri, 28 Dec 2018 15:36:22 +0000 Received: by mail-qt1-x842.google.com with SMTP id i7so23665288qtj.10 for ; Fri, 28 Dec 2018 07:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=PlYKfnrGfIXat7+OyNZ5TXC4V+PaC5QNYoqRIyUR1x8=; b=10nXa+lXxf6hwUyX724lSG/Y4YC07Vytr7uuqpypRQWaDdaVouDK5Am/gC1DlaGSkN 1FUzZQgIKXhPOPSn1Y0lssfYiAHGxaAxb/gRPp6k9/+rS6dpopb/hvWMBkIz9ORGUyxt miuw1rOkJLUx4Ermj0sszP9b/hwWj24ZZR5f1IDrh7PGzfL6ReA5CP2btDhHH7gcHr8B QWkaDXZiHXQnV2YRGnf2jjW+xKIpKtXe+JNeLcS4xjSptRLuEhg/zovd9qDxY4D1p15T kxKodGvOiSRGSNTwPHLMt5A3FWTWk0QbJjk5Y3T0HwORWmzM4147hxOnNXyY3AmV9dQp 1RbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=PlYKfnrGfIXat7+OyNZ5TXC4V+PaC5QNYoqRIyUR1x8=; b=o4XvqHGMcfOLlcWPJ0GBAqG1elyvdgU1lSspeNAiFitAcHYmM++grq9qotG1OsCcvM f2l+jnpnsJ2S3lt4AKkWuFp6q9TgkqlCKqPuhe9nKnjIm21N5sqtwD855u06O7c2AfPh 2kt7ckBk/bLESBZQUuhSwaiJHQ6OfcUtTJiJ1+PUwWTTyFfPKLoo0Fc77BIkYFPStFjN u0nyo8uUtvaLJ1oefkOEmhz/VcVXbJv7Lgev1yfBhlYL2WL7nVrHYn/U9obR7w7mFGdK iZhcDODvnoZyrjcV4FbykHwS7CDJ56EkfPdUOd30EJAikxtD+VfsH3TTQC8tCXhnDCTk Kshw== X-Gm-Message-State: AJcUukcglj/FAoRNUGe61MLxbGWT+jQLWzPRUtfLw6ICdcrH/cqIuZ9n 1Ggku1FtiH8nN4Ni59bBC+0twA== X-Google-Smtp-Source: ALg8bN5SJthMLA/IM23Q314dfL2y0G5jeWI1E8fYhma27xrd3vmD5p9ONA0GJI0umL7mttINq9LGQA== X-Received: by 2002:ac8:169b:: with SMTP id r27mr25681080qtj.23.1546011377917; Fri, 28 Dec 2018 07:36:17 -0800 (PST) Received: from alvin.alvh.no-ip.org ([201.186.19.206]) by smtp.gmail.com with ESMTPSA id q70sm19829806qkq.10.2018.12.28.07.36.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Dec 2018 07:36:17 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id C06F1A2F; Fri, 28 Dec 2018 12:36:14 -0300 (-03) Date: Fri, 28 Dec 2018 12:36:14 -0300 From: Alvaro Herrera To: ZongtianHou Cc: pgsql-admin Subject: Re: Schema and Namespace Oid confusion Message-ID: <201812281536.wlr7arvxlfsk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <860D4620-5D8C-4D24-991B-6B18F2BC94A5@icloud.com> User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello On 2018-Dec-28, ZongtianHou wrote: > I get somehow confused when I learn about namespace here, there are two questions, > First, what is the difference between namespace and schema? None. Schema is the user-visible name for the feature; namespace is the source code and system catalog level. > Second, why the Oid of public namespace is 2200, the same between > databases? Not necessarily. That's the initial value, but it's possible to drop the public schema and create it afresh. > Does oid is unique for every object across cluster? No, only inside each individual catalog are OIDs guaranteed unique. > Does someone know about these clearly? Yes. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services