Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t83lo-001lE4-KC for pgsql-general@arkaria.postgresql.org; Mon, 04 Nov 2024 20:33:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t83ll-0052qs-BD for pgsql-general@arkaria.postgresql.org; Mon, 04 Nov 2024 20:33:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t83lj-0052qb-Sx for pgsql-general@lists.postgresql.org; Mon, 04 Nov 2024 20:33:49 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t83lh-000BeO-KK for pgsql-general@postgresql.org; Mon, 04 Nov 2024 20:33:47 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id ED9571380458; Mon, 4 Nov 2024 15:33:43 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 04 Nov 2024 15:33:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1730752423; x=1730838823; bh=Y3zqQB62XWMG60bCWD1SFGFqasV9WSZ4xCngM19GUyY=; b= EqzZMkMmkL1YksJMVmHl2lB9p1nJReAQimRIgFjM9Q9dyraP4N3ZphuIjJ3grQSm 3R8DzqxhPO4Lo7BITSl78vBKE2p6Nm7oa7lEwHlv5EQs77+TVTQ0J8WNaoXzIfp3 d9b1bnbPOXOfAjadqeMSwJXpG7PgwX8mDoq9MoFMzfSndYV4rE5OH8N2h1P2LE8r HpfFdoxsRFLVHmnmIHb+cUVV8dUDtGSnfKukRHKnsvsJb9wJ4nZ8RdTZAGtK9WhT xpi76yCu7/XkA7CaeVBVPc6QzdauWxmbWqaQTQ69yh2w/WLP6U1hhHc4MoFjr8+G cGmuSUSNkkamHj1sNqwVRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1730752423; x=1730838823; bh=Y 3zqQB62XWMG60bCWD1SFGFqasV9WSZ4xCngM19GUyY=; b=oM+HtJn0vUD6pT5/z 0mZp7PzZUoOnCrCI4J+OP8axYL06ChGVHP4mj7/ihtNC1s8Wso+HmXv/O1eFMX1/ J5YEE8WIUw8k4BubnvTgkDRev9vVaOj6pW/GPqpY3js4qFtGXff4DpqpCpALnXwG Tv+iwkp8PT3WWkfhKuiYUOFtScIjsYEihlI7jLS9CKLGe7X86QBWt8ZSa7p/x1Vi A3W7WLE8NS42461qpgoXONG1to7TsbBlCouhfsGyoxr8Iu64keSNFwhFFPATDKv1 oU9ivI5w6qiYCXLFmXrMVVSP41ShuCEVBKagqoHg/D1NH9T4jiGp6xncCU7JnO7x Mbe7A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdeliedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepiedvhfeiheehgeeuieel jeeitedtjeehudegfeelkedvleekhedtgfeiffefkedunecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepjhhrsegrmhgrnhhuvgdrtghomhdprhgtphhtthhopehpghhsqhhlqdhg vghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Nov 2024 15:33:43 -0500 (EST) Message-ID: Date: Mon, 4 Nov 2024 12:33:42 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Column name beginning with underscore ("_")? To: Jim Rosenberg , pgsql-general@postgresql.org References: <20241104150203.f808f1e63e67dddcd3204d29@amanue.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <20241104150203.f808f1e63e67dddcd3204d29@amanue.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/4/24 12:02, Jim Rosenberg wrote: > Is it considered bad Postgresql practice to have a column name that begins > with the underscore character ("_")? > > I'm not sure where this is documented, but I'm seeing that Postgresql > accepts prepending an underscore to a data type name as a kind of alias for > appending [] to define an array data type. So even though Postgresql > doesn't seem to have this problem, a human reader might confuse a column > name beginning with _ as an array data type reference. > > Here is why I want to have some column names beginning with "_". I'm > designing a database to shadow a public agency's data. I need some columns > that reflect *my* shadow copy of the data, (like say download date) that > don't have any semantic import with respect to the original data. > Beginning such columns with "_" is a simple way to keep the column names > uncluttered but indicate to the reader that the column applies to *my > copy* but are not columns in the original data. To reduce confusion something like?: my_* or l(ocal)_* > > Comments? > > -- Adrian Klaver adrian.klaver@aklaver.com