code: func PgPltemplateByTmplname(db XODB, tmplname pgtypes.Name) (*PgPltemplate, error) {
  	var err error
  
  	// sql query
  	const sqlstr = `SELECT ` +
  		`tableoid, cmax, xmax, cmin, xmin, ctid, tmplname, tmpltrusted, tmpldbacreate, tmplhandler, tmplinline, tmplvalidator, tmpllibrary, tmplacl ` +
  		`FROM pg_catalog.pg_pltemplate ` +
  		`WHERE tmplname = $1`
  
  	// run query
  	XOLog(sqlstr, tmplname)
  	pp := PgPltemplate{}
  
  	err = db.QueryRow(sqlstr, tmplname).Scan(&pp.Tableoid, &pp.Cmax, &pp.Xmax, &pp.Cmin, &pp.Xmin, &pp.Ctid, &pp.Tmplname, &pp.Tmpltrusted, &pp.Tmpldbacreate, &pp.Tmplhandler, &pp.Tmplinline, &pp.Tmplvalidator, &pp.Tmpllibrary, &pp.Tmplacl)
  	if err != nil {
  		return nil, err
  	}
  
  	return &pp, nil
  }
docs: // PgPltemplateByTmplname retrieves a row from 'pg_catalog.pg_pltemplate' as a PgPltemplate.
  //
  // Generated from index 'pg_pltemplate_name_index'.