code: func QuoteIdent(segments ...string) string {
  	var buf bytes.Buffer
  	for i, segment := range segments {
  		needQuote := IdentNeedsQuotes(segment) ||
  			((i < len(segments)-1) && segment != "") || // not last segment && not ""
  			((i == 0 || i == len(segments)-1) && segment == "") // the first or last segment and an empty string
  
  		if needQuote {
  			_ = buf.WriteByte('"')
  		}
  
  		_, _ = buf.WriteString(qiReplacer.Replace(segment))
  
  		if needQuote {
  			_ = buf.WriteByte('"')
  		}
  
  		if i < len(segments)-1 {
  			_ = buf.WriteByte('.')
  		}
  	}
  	return buf.String()
  }
docs: // QuoteIdent returns a quoted identifier from multiple bare identifiers.