---
title: SQL-002 PostgreSQL system date
summary: PostgreSQL current_date query backing ISessionHelper.SystemDate.
status: draft
owner: Framework
last_reviewed: 2026-10-02
library: SAIF.NetCore.NHibernate
reference_type: package
---

# SQL-002 PostgreSQL system date

This raw SQL statement is issued by `PostgreSqlSessionHelper`/`SessionHelperBase` to read the PostgreSQL database server's current date, which backs the `ISessionHelper.SystemDate`/`IRepository<TEntity>.SystemDate` property consumers use for server-authoritative timestamps (see [BR-NH-17](../business-rules.md#br-nh-17-systemdate-comes-from-the-database-server)).

> **PostgreSQL caveat:** `current_date` returns a DATE-only value (midnight, no time-of-day component), unlike Oracle's `sysdate`/SQL Server's `GetDate()`, which both return full date+time — see [BR-NH-17](../business-rules.md#br-nh-17-systemdate-comes-from-the-database-server) and [Get database system date](../operations/get-database-system-date.md).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-002 |
| **Operation type** | Read |
| **Execution method** | Inline SQL via `ISessionStrategy.CreateSqlQuery(string).UniqueResult()` |
| **Database** | PostgreSQL |
| **Schema** | Unqualified** (depends on the consumer's connection string/search_path) |
| **Command type** | Text |
| **Business object** | N/A (Application layer) |
| **Criteria property** | N/A |
| **Lifecycle method** | N/A |
| **Application class** | `PostgreSqlSessionHelper` (via `SessionHelperBase.SystemDate`) |

## Parameters

This statement has no parameters.

## Tables

No tables — `current_date` is a PostgreSQL built-in function and requires no `FROM` clause.

## Sample SQL

```sql
SELECT
  current_date
```

## Operations and processes
- [Get database system date](../operations/get-database-system-date.md)

## Business rules
- [BR-NH-17](../business-rules.md#br-nh-17-systemdate-comes-from-the-database-server)
- [BR-NH-18](../business-rules.md#br-nh-18-systemdate-falls-back-to-local-time-on-sentinel-values)

> **Note:** Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/SessionHelpers/PostgreSqlSessionHelper.cs`
- `src/SAIF.NetCore.Nhibernate/SAIF.NetCore.NHibernate/SAIF.NetCore.NHibernate/SessionHelpers/SessionHelperBase.cs`
