To create a Golang web server with endpoints for creating, reading, updating, and deleting records in a PostgreSQL database using prepared statements, follow these steps:

1. Install the necessary packages:
- Go: https://golang.org/doc/install
- Gorilla Mux (for routing): `go get -u github.com/gorilla/mux`
- pq (PostgreSQL driver for Go's database/sql package): `go get -u github.com/lib/pq`

2. Create a new file named `main.go` and add the following code to set up the basic structure of the application:

```go
package main

import (
	"database/sql"
	"encoding/json"
	"fmt"
	"log"
	"net/http"

	"github.com/gorilla/mux"
	_ "github.com/lib/pq"
)

type Record struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Value string `json:"value"`
}

var db *sql.DB

func main() {
	var err error
	db, err = sql.Open("postgres", "user=your_user password=your_password dbname=your_db sslmode=disable")
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	router := mux.NewRouter()
	router.HandleFunc("/records", createRecord).Methods("POST")
	router.HandleFunc("/records", getRecords).Methods("GET")
	router.HandleFunc("/records/{id}", getRecord).Methods("GET")
	router.HandleFunc("/records/{id}", updateRecord).Methods("PUT")
	router.HandleFunc("/records/{id}", deleteRecord).Methods("DELETE")

	fmt.Println("Server running on port 8000...")
	log.Fatal(http.ListenAndServe(":8000", router))
}
```

Replace `your_user`, `your_password`, and `your_db` with your actual PostgreSQL credentials.

3. Add the CRUD functions for handling the HTTP requests:

```go
func createRecord(w http.ResponseWriter, r *http.Request) {
	var record Record
	json.NewDecoder(r.Body).Decode(&record)

	stmt, err := db.Prepare("INSERT INTO records (name, value) VALUES ($1, $2) RETURNING id")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	err = stmt.QueryRow(record.Name, record.Value).Scan(&record.ID)
	if err != nil {
		log.Fatal(err)
	}

	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(record)
}

func getRecords(w http.ResponseWriter, r *http.Request) {
	rows, err := db.Query("SELECT id, name, value FROM records")
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	var records []Record
	for rows.Next() {
		var record Record
		err := rows.Scan(&record.ID, &record.Name, &record.Value)
		if err != nil {
			log.Fatal(err)
		}
		records = append(records, record)
	}

	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(records)
}

func getRecord(w http.ResponseWriter, r *http.Request) {
	params := mux.Vars(r)
	id := params["id"]

	var record Record
	stmt, err := db.Prepare("SELECT id, name, value FROM records WHERE id=$1")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	err = stmt.QueryRow(id).Scan(&record.ID, &record.Name, &record.Value)
	if err != nil {
		if err == sql.ErrNoRows {
			http.Error(w, "Record not found", http.StatusNotFound)
			return
		}
		log.Fatal(err)
	}

	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(record)
}

func updateRecord(w http.ResponseWriter, r *http.Request) {
	params := mux.Vars(r)
	id := params["id"]

	var record Record
	json.NewDecoder(r.Body).Decode(&record)

	stmt, err := db.Prepare("UPDATE records SET name=$1, value=$2 WHERE id=$3")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	result, err := stmt.Exec(record.Name, record.Value, id)
	if err != nil {
		log.Fatal(err)
	}

	rowsAffected, err := result.RowsAffected()
	if err != nil {
		log.Fatal(err)
	}

	if rowsAffected == 0 {
		http.Error(w, "Record not found", http.StatusNotFound)
		return
	}

	w.WriteHeader(http.StatusOK)
}

func deleteRecord(w http.ResponseWriter, r *http.Request) {
	params := mux.Vars(r)
	id := params["id"]

	stmt, err := db.Prepare("DELETE FROM records WHERE id=$1")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	result, err := stmt.Exec(id)
	if err != nil {
		log.Fatal(err)
	}

	rowsAffected, err := result.RowsAffected()
	if err != nil {
		log.Fatal(err)
	}

	if rowsAffected == 0 {
		http.Error(w, "Record not found", http.StatusNotFound)
		return
	}

	w.WriteHeader(http.StatusOK)
}
```

4. Run the application with `go run main.go`. The server will start on port 8000 and you can use a tool like Postman or curl to test the endpoints.

Note: Make sure your PostgreSQL database has a table named `records` with columns `id`, `name`, and `value`.
준비된 문을 사용하여 PostgreSQL 데이터베이스에서 레코드를 생성, 읽기, 업데이트 및 삭제하기 위한 엔드포인트가 있는 Golang 웹 서버를 만들려면 다음 단계를 따르세요.

1. 필요한 패키지를 설치합니다:
- Go: https://golang.org/doc/install
- Gorilla Mux(라우팅용): `go get -u github.com/gorilla/mux`
- pq(Go의 데이터베이스/sql 패키지를 위한 PostgreSQL 드라이버): `go get -u github.com/lib/pq`

2. main.go`라는 새 파일을 생성하고 다음 코드를 추가하여 애플리케이션의 기본 구조를 설정합니다:

```go
package main

import (
	"database/sql"
	"encoding/json"
	"fmt"
	"log"
	"net/http"

	"github.com/gorilla/mux"
	_ "github.com/lib/pq"
)

type Record struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Value string `json:"value"`
}

var db *sql.DB

func main() {
	var err error
	db, err = sql.Open("postgres", "user=your_user password=your_password dbname=your_db sslmode=disable")
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	router := mux.NewRouter()
	router.HandleFunc("/records", createRecord).Methods("POST")
	router.HandleFunc("/records", getRecords).Methods("GET")
	router.HandleFunc("/records/{id}", getRecord).Methods("GET")
	router.HandleFunc("/records/{id}", updateRecord).Methods("PUT")
	router.HandleFunc("/records/{id}", deleteRecord).Methods("DELETE")

	fmt.Println("Server running on port 8000...")
	log.Fatal(http.ListenAndServe(":8000", router))
}
```

`your_user`, `your_password`, `your_db`를 실제 PostgreSQL 자격 증명으로 바꿉니다.

3. HTTP 요청을 처리하기 위한 CRUD 함수를 추가합니다:

```go
func createRecord(w http.ResponseWriter, r *http.Request) {
	var record Record
	json.NewDecoder(r.Body).Decode(&record)

	stmt, err := db.Prepare("INSERT INTO records (name, value) VALUES ($1, $2) RETURNING id")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	err = stmt.QueryRow(record.Name, record.Value).Scan(&record.ID)
	if err != nil {
		log.Fatal(err)
	}

	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(record)
}

func getRecords(w http.ResponseWriter, r *http.Request) {
	rows, err := db.Query("SELECT id, name, value FROM records")
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	var records []Record
	for rows.Next() {
		var record Record
		err := rows.Scan(&record.ID, &record.Name, &record.Value)
		if err != nil {
			log.Fatal(err)
		}
		records = append(records, record)
	}

	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(records)
}

func getRecord(w http.ResponseWriter, r *http.Request) {
	params := mux.Vars(r)
	id := params["id"]

	var record Record
	stmt, err := db.Prepare("SELECT id, name, value FROM records WHERE id=$1")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	err = stmt.QueryRow(id).Scan(&record.ID, &record.Name, &record.Value)
	if err != nil {
		if err == sql.ErrNoRows {
			http.Error(w, "Record not found", http.StatusNotFound)
			return
		}
		log.Fatal(err)
	}

	w.Header().Set("Content-Type", "application/json")
	json.NewEncoder(w).Encode(record)
}

func updateRecord(w http.ResponseWriter, r *http.Request) {
	params := mux.Vars(r)
	id := params["id"]

	var record Record
	json.NewDecoder(r.Body).Decode(&record)

	stmt, err := db.Prepare("UPDATE records SET name=$1, value=$2 WHERE id=$3")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	result, err := stmt.Exec(record.Name, record.Value, id)
	if err != nil {
		log.Fatal(err)
	}

	rowsAffected, err := result.RowsAffected()
	if err != nil {
		log.Fatal(err)
	}

	if rowsAffected == 0 {
		http.Error(w, "Record not found", http.StatusNotFound)
		return
	}

	w.WriteHeader(http.StatusOK)
}

func deleteRecord(w http.ResponseWriter, r *http.Request) {
	params := mux.Vars(r)
	id := params["id"]

	stmt, err := db.Prepare("DELETE FROM records WHERE id=$1")
	if err != nil {
		log.Fatal(err)
	}
	defer stmt.Close()

	result, err := stmt.Exec(id)
	if err != nil {
		log.Fatal(err)
	}

	rowsAffected, err := result.RowsAffected()
	if err != nil {
		log.Fatal(err)
	}

	if rowsAffected == 0 {
		http.Error(w, "Record not found", http.StatusNotFound)
		return
	}

	w.WriteHeader(http.StatusOK)
}
```

4. go run main.go`로 애플리케이션을 실행합니다. 서버가 포트 8000에서 시작되며 Postman 또는 curl과 같은 도구를 사용하여 엔드포인트를 테스트할 수 있습니다.

주: PostgreSQL 데이터베이스에 `id`, `name`, `value` 열이 있는 `records`라는 이름의 테이블이 있는지 확인합니다.