From a68920e4413ba6c0de00398a768447e3bd4800f3 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Fri, 13 Mar 2026 19:07:40 +0000 Subject: [PATCH] Fix broken link and improve date and time docs --- doc/src/architecture/timestamps.m4 | 13 ++++++++++--- doc/src/epilog.inc.m4 | 3 --- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/src/architecture/timestamps.m4 b/doc/src/architecture/timestamps.m4 index af7af46..745cf3c 100644 --- a/doc/src/architecture/timestamps.m4 +++ b/doc/src/architecture/timestamps.m4 @@ -1,4 +1,4 @@ -.. Copyright (C) 2023, 2025 The Meme Factory, Inc. www.karlpinc.com +.. Copyright (C) 2023, 2025, 2026 The Meme Factory, Inc. www.karlpinc.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -26,9 +26,12 @@ Dates and Times In SQL dates and times are written as strings, so are enclosed in single quotes (or `dollar quotes`_). -But the system must be told that the data is a date, or a time, etc.\ [#f1]_ +Sometimes, as when a value is being inserted into a column that holds +a date, the system automatically converts the given string value. +But sometimes the system must be told that the data is a date, or a +time, etc.\ [#f1]_ The easy way to type this is to follow the string with two colons -and then the name of the appropriate `data type `_. +and then the name of the appropriate `data type`_. This is best illustrated with an example:: SELECT '1707-05-23'::DATE; @@ -101,3 +104,7 @@ put some work into changing your time zone. .. [#f2] This is the ISO 8601 format. .. [#f3] E.g. ``SET TIME ZONE 'US/Mountain';`` + + +.. _data type: + https://www.postgresql.org/docs/current/datatype-datetime.html diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index 2cd7769..091b36d 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -33,9 +33,6 @@ sdb_generated_rst()dnl .. _tri-valued logic: https://www.postgresql.org/docs/current/ functions-logical.html -.. _date and time types: - https://www.postgresql.org/docs/current/datatype-datetime.html - .. _transaction isolation: https://www.postgresql.org/docs/current/transaction-iso.html -- 2.34.1