Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 9 min read How-to mediumAdept

What To Know About Postgres if You’re Coming From SQL Server

Postgres and SQL Server share SQL but differ in dialect details that trip up migrating developers. Identifiers are quoted with double quotes instead of square brackets. GETDATE/DATEADD/DATEDIFF become CURRENT_TIMESTAMP, interval arithmetic and date subtraction, and TOP becomes LIMIT/OFFSET. Strings concatenate with || rather than +, CROSS APPLY becomes CROSS JOIN LATERAL, and string comparison is case-sensitive by default. Beyond syntax, Postgres is community-driven, so features like UUID generation or trigram search arrive as extensions, and tooling and hosting choices are open rather than vendor-defined.

Related posts

  • The Dangers of Testing in SQLite as a Postgres User

    Neon mediumAdept

    Testing against SQLite when production runs Postgres gives false confidence. SQLite's type affinity accepts a float in an INTEGER column that Postgres rejects. It also lacks native JSONB operators, arrays and advanced window functions. Its database-level, single-writer locking and in-process, low-I/O design hide Postgres concurrency behavior and performance characteristics. The recommended alternative is ephemeral Neon branches per test, which give real Postgres semantics with throwaway isolation.

  • Postgres Language Server: Initial Release

    Supabase mediumAdept

    Postgres Language Server is an LSP implementation for Postgres offering autocompletion, syntax error highlighting, type-checking via PREPARE/EXPLAIN against a live database, and a Squawk-inspired linter, available for VSCode, Neovim and as a CLI. Its architecture treats each SQL statement as an independent compilation unit with the database schema as the source of truth. A custom Pratt-parser statement splitter falls back to semicolons and double newlines. libpg_query handles precise parsing of valid SQL, while tree-sitter covers incomplete input for autocompletion. On edits, only changed statements are invalidated and later statements just have their ranges shifted, so cached ASTs survive. Completions are scored from a lazily loaded in-memory schema cache, so no database query is needed per keystroke.

  • What's New in pg_clickhouse v0.3.2: Postgres 19, TLS, Regex, and Memory

    ClickHouse mediumAdept

    pg_clickhouse v0.3.2, the Postgres extension for querying ClickHouse, adds support for PostgreSQL 19 Beta1 and needs no restart or ALTER EXTENSION UPDATE. New CREATE SERVER options cover TLS behavior (`secure` on/off/auto, `min_tls_version`) and native protocol compression. Regex flag pushdown has been corrected, with a mapping table and a warning that Postgres and ClickHouse treat negated character classes differently around newlines. The release also fixes memory ballooning in repeatedly re-scanned parameterized foreign scans and in unbuffered HTTP queries, pushes down capture-free regexp_match(), and fixes empty-array ANY() errors on older ClickHouse.

  • Postgres Language Server: implementing the Parser

    Supabase hardMaster

    A Postgres language server's parser builds on libpg_query rather than a custom grammar, and has to work around two gaps in it. To tolerate syntax errors, a resilient LL source parser splits input into statements by their distinct leading keywords and parses each one independently. Because libpg_query exposes only an AST with incomplete or misleading location data, the CST is reverse-engineered by matching scanned tokens (plus regex-extracted whitespace) to node properties, using a breadth-first search over the tree. Rust procedural macros generate the location, property and tree-walking code from libpg_query's protobuf definitions, which removes most of the manual match-statement boilerplate.

  • pg_clickhouse & chdb updates: Encoding, nesting, and types

    ClickHouse mediumAdept

    pg_clickhouse v0.11.0 and the chdb extension v0.1.2 improve Postgres–ClickHouse type compatibility. A new `check_encoding` option (fail, remove, replace, truncate) handles invalidly encoded text, and ClickHouse Interval types now import as Postgres `interval` with pushdown of expressions like `start_at + duration`. Parameterized JSON columns map to jsonb so `ORDER BY` on a property pushes down correctly, and unflattened Nested columns map to 2-D text arrays or to matching composite-type arrays. The release also adds mappings for large integers, geo and time types, pushes down the sha*/digest functions, removes `clickhouse_raw_query()` and drops PostgreSQL 13 support.

The quest for software engineering knowledge.

Look:
Layout: