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 1iDoSi-0006eD-6n for pgsql-docs@arkaria.postgresql.org; Fri, 27 Sep 2019 11:31:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iDoSg-0000kC-TH for pgsql-docs@arkaria.postgresql.org; Fri, 27 Sep 2019 11:30:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iDoSg-0000k4-JD for pgsql-docs@lists.postgresql.org; Fri, 27 Sep 2019 11:30:58 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iDoSd-0005DB-O0 for pgsql-docs@postgresql.org; Fri, 27 Sep 2019 11:30:57 +0000 Received: by mail-wr1-x442.google.com with SMTP id q17so2301745wrx.10 for ; Fri, 27 Sep 2019 04:30:55 -0700 (PDT) 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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xJVu+Du//lFqIX4CgHgwBwa0H7plQDKmUidfvoJ5dsA=; b=E6zlrf8SFH3aVHqjXgccljcvXGddl89vCNebAskxoLms0uj9FpvynNPd3Nja2+070C Qa6dUMRVs8EupNA4lV3/QEIMQRo7iJVdsQFRrIyj+rYyfgtpy1jDxxyu6fIJU2IE1+zo gzm02dmoLrQwtXJ9rlMkgcx5+gTnQpGYfOzkyHU1bQfmlRCAqWiNDoXWrPybYc+xlJmZ Ac/osg33QuUrz6tquQ/lhS3IoBpGfpozf7cQVOTRgZl0tJ6uoMbDmQTrQsQ/PPcB8eZc +guH+fIyDWSqCWdfJjOCjrBGWySQaAcV2WAPFSO7+6p5DQUE3gQg6Pb8d6Vb1VuNZVDi DTaw== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xJVu+Du//lFqIX4CgHgwBwa0H7plQDKmUidfvoJ5dsA=; b=le5eG4rJ3GgYwP49iuUMAypn64FJZhj8uJmBULMAUb3ZvJyqyv0RYyst9gM7PbNZoF +NRE6Nx/1DegaCE9GE5Ye4ldRwJKPVanvK5rw/BfQgZcpyPRXsIXP/sLZEudwTPUtS4z MJD61hGqFQfP5wQQSUEbu145ybPhJUkWmquW5EQhE8BZQUpSMl161sdSuzx++nt6qpDl WgAeH9vzpOUTEi2EoaiIWzJOkd4629776KI2J8d7HESjhWNKA7YU50Fo1kE2nRzPT01u WUFJwDGe9ttdcr7PfWo2GBL7usRMsCZJT3dXgyVrgt9THptH+LMzEhX5ESUg54Wfqapw UocA== X-Gm-Message-State: APjAAAW4UM6zJpc3MJYJOZPIJCkNE5JbC7rMWFtzL1Zw9Z1Hcxuid3Cr keArPQKZNu/PXDW7mLGhbH1OWymvIK0= X-Google-Smtp-Source: APXvYqzQ+p3+pWj8swq/mPSIMdbBdzPMGMQ+9zPnwNgfo0ZAXQGNgcvTx2TywgtCrwg99ofG3MeN3A== X-Received: by 2002:adf:e488:: with SMTP id i8mr2778516wrm.20.1569583854176; Fri, 27 Sep 2019 04:30:54 -0700 (PDT) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id u83sm17723271wme.0.2019.09.27.04.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2019 04:30:51 -0700 (PDT) Date: Fri, 27 Sep 2019 13:30:49 +0200 From: Tomas Vondra To: Bruce Momjian Cc: Alvaro Herrera , PostgreSQL-documentation Subject: Re: Most-common value docs in PG 12 Message-ID: <20190927113049.umhdz4khs5uvq4q7@development> References: <20190926200522.GB16366@momjian.us> <20190926201755.GA18930@alvherre.pgsql> <20190926202059.GD16366@momjian.us> <20190926210354.dcwq5frjs44gbvkz@development> <20190926213107.GF16366@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190926213107.GF16366@momjian.us> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Sep 26, 2019 at 05:31:07PM -0400, Bruce Momjian wrote: >On Thu, Sep 26, 2019 at 11:03:54PM +0200, Tomas Vondra wrote: >> On Thu, Sep 26, 2019 at 04:20:59PM -0400, Bruce Momjian wrote: >> > Uh, people normally list things in defined order, so you would usually >> > not list them in non-defined order unless there is a purpose. Doing >> > that just to illustrate the order doesn't matter seems odd. >> > >> >> Well, that assumes there is a definition, and I don't think the zipcodes >> table is defined anywhere. So how do you know in what order are those >> columns defined? > >In the USA, it is usually specific to general, i.e., city, state. > I'd probably define it the same way, but for example the zipcode data sets I usually use for my talks [1] defines it like this: postal code : varchar(20) place name : varchar(180) admin name1 : 1. order subdivision (state) varchar(100) admin code1 : 1. order subdivision (state) varchar(20) admin name2 : 2. order subdivision (county/province) varchar(100) admin code2 : 2. order subdivision (county/province) varchar(20) admin name3 : 3. order subdivision (community) varchar(100) admin code3 : 3. order subdivision (community) varchar(20) latitude : estimated latitude (wgs84) longitude : estimated longitude (wgs84) accuracy : accuracy of lat/lng so in this case it's a bit of a mix of specific vs. general first. [1] http://download.geonames.org/export/zip/ >> Now, maybe the table should be defined somewhere in perform.sgml - I >> don't recall why exactly I chose not to do that, maybe because there is >> no universal definition (one country uses text, another number, ...) > >Yeah, doesn't seem worth adding. > OK. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services