MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestFallbackWithValidPostgreSQL

Function TestFallbackWithValidPostgreSQL

tests/integration/fallback_test.go:176–201  ·  view source on GitHub ↗

TestFallbackWithValidPostgreSQL ensures valid PostgreSQL still goes through the normal transpilation path (no fallback)

(t *testing.T)

Source from the content-addressed store, hash-verified

174// TestFallbackWithValidPostgreSQL ensures valid PostgreSQL still goes through
175// the normal transpilation path (no fallback)
176func TestFallbackWithValidPostgreSQL(t *testing.T) {
177 // These should work on both PostgreSQL and Duckgres via transpilation
178 tests := []QueryTest{
179 {
180 Name: "select_simple",
181 Query: "SELECT 1 AS num",
182 },
183 {
184 Name: "select_from_users",
185 Query: "SELECT id, name FROM users LIMIT 5",
186 },
187 {
188 Name: "select_with_where",
189 Query: "SELECT * FROM users WHERE id = 1",
190 },
191 {
192 Name: "insert_select",
193 Query: "SELECT 'test'::text AS name",
194 },
195 {
196 Name: "cte_query",
197 Query: "WITH nums AS (SELECT generate_series AS n FROM generate_series(1,3)) SELECT * FROM nums",
198 },
199 }
200 runQueryTests(t, tests)
201}
202
203// TestFallbackPreparedStatement tests that DuckDB-specific syntax works
204// with the extended query protocol (prepared statements)

Callers

nothing calls this directly

Calls 1

runQueryTestsFunction · 0.85

Tested by

no test coverage detected