[PATCH] fix doc example of bit-reversed MAC address

Started by Will Mortensenover 3 years ago2 messages
#1Will Mortensen
will@extrahop.com
1 attachment(s)

Pretty trivial since this is documenting something that Postgres
*doesn't* do, but it incorrectly reversed only the bits of each
nibble, not the whole byte. See e.g.
https://www.ibm.com/docs/en/csfdcd/7.1?topic=ls-bit-ordering-in-mac-addresses
for a handy table.

Attachments:

macaddr-bitrev-example.patchapplication/x-patch; name=macaddr-bitrev-example.patchDownload
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 9b0c6c6926..eb2cf34ae6 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -3907,7 +3907,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
      IEEE Std 802-2001 specifies the second shown form (with hyphens)
      as the canonical form for MAC addresses, and specifies the first
      form (with colons) as the bit-reversed notation, so that
-     08-00-2b-01-02-03 = 01:00:4D:08:04:0C.  This convention is widely
+     08-00-2b-01-02-03 = 10:00:D4:80:40:C0.  This convention is widely
      ignored nowadays, and it is relevant only for obsolete network
      protocols (such as Token Ring).  PostgreSQL makes no provisions
      for bit reversal, and all accepted formats use the canonical LSB
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Will Mortensen (#1)
Re: [PATCH] fix doc example of bit-reversed MAC address

Will Mortensen <will@extrahop.com> writes:

Pretty trivial since this is documenting something that Postgres
*doesn't* do, but it incorrectly reversed only the bits of each
nibble, not the whole byte.

Duh, right. Will fix, thanks for noticing!

regards, tom lane