docs(pgserver): v1.0 reference + known-limitations writeup

Single source of truth for what's shipping in v1.0: PRG API, supported
features (wire protocol, auth modes, TLS, allowlist, type marshalling,
pg_catalog stubs), explicit known-limitations section (high-concurrency
writes, in-memory roles, no pg_hba.conf, CancelRequest no-op, binary
BYTEA, no idle timeout), and a security-model note clarifying when each
auth mode is appropriate.

README.md gets a feature bullet pointing at the new doc plus a worked
example showing pg_demo.prg + psql, and the status table now reflects
the full 6-gate suite (43/43 SQL, 56/56 compat, 17/17 std.ch, 7/7 FRB,
11/11 pgserver). Stale 51/51 references corrected.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 12:31:19 +09:00
parent d7a81af7db
commit 6962e30151
2 changed files with 296 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ employees.prg → five build → employees (단일 실행파일, 18MB)
- DBF/NTX/CDX 데이터베이스 엔진 내장
- 479개 RTL 내장 함수
- FiveSql2: DBF 위에서 SQL:1999 쿼리 (43/43 테스트 통과)
- **pgserver**: PostgreSQL 와이어 프로토콜 v3 — psql/pgx/JDBC/DBeaver 등 모든 PG 클라이언트가 DBF 테이블에 직접 접속 (SCRAM-SHA-256, TLS, 11/11 통합 테스트 통과). 자세한 내용은 [docs/pgserver.md](docs/pgserver.md)
- Goroutine/Channel 확장 (`GO BLOCK`, `CHANNEL`)
- @byref 참조 전달, mutable closure
- 대화형 디버거 (TUI/CLI)
@@ -106,9 +107,18 @@ go test ./...
./five build _FiveSql2/test/test_sql1999.prg _FiveSql2/src/*.prg -o /tmp/test_sql
cd /tmp && ./test_sql
# Harbour 호환 테스트 (51/51)
# Harbour 호환 테스트 (56/56)
./five build tests/compat_harbour.prg -o /tmp/test_compat
/tmp/test_compat
# std.ch 매크로 테스트 (17/17)
bash tests/std_ch/run.sh
# FRB 모듈 테스트 (7/7)
bash tests/frb/run.sh
# pgserver 통합 테스트 (11/11) — psql 필요
bash tests/pgserver/run.sh
```
---
@@ -169,6 +179,34 @@ RETURN
---
## PostgreSQL 클라이언트로 원격 접속
같은 SQL 엔진을 TCP/IP로 공개합니다. `psql`, pgx, JDBC, DBeaver, Tableau 등
모든 PostgreSQL 클라이언트가 그대로 접속합니다.
```harbour
// pg_demo.prg
#include "FiveSqlDef.ch"
PROCEDURE Main()
USE customers SHARED NEW
PG_ADD_ROLE( "alice", "swordfish" )
PG_SERVER_START( ":5432", "scram-sha-256" ) /* blocks */
RETURN
```
```bash
./five build pg_demo.prg _FiveSql2/src/*.prg -o pg_demo && ./pg_demo &
PGPASSWORD=swordfish psql 'postgres://alice@127.0.0.1:5432/alice?sslmode=disable' \
-c "SELECT * FROM customers"
```
지원 기능: Simple + Extended Protocol, BEGIN/COMMIT/ROLLBACK, trust/password/
md5/SCRAM-SHA-256 인증, TLS, 소스 IP allowlist, pg_catalog stub (BI 도구).
**제약 및 보안 모델은 반드시 [docs/pgserver.md](docs/pgserver.md)를 확인하세요.**
---
## 프로젝트 구조
```
@@ -203,7 +241,10 @@ five/
| RTL 내장 함수 | 479개 |
| RDD 드라이버 | 4종 (DBF, NTX, CDX, Memory) |
| FiveSql2 테스트 | 43/43 (100%) |
| 호환 테스트 | 51/51 (100%) |
| Harbour 호환 테스트 | 56/56 (100%) |
| std.ch 테스트 | 17/17 (100%) |
| FRB 테스트 | 7/7 (100%) |
| pgserver 통합 테스트 | 11/11 (100%) |
| Go 테스트 | ALL PASS |
## 라이선스