1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00
Files
postgres/doc/src/sgml/ref/current_date.sgml
Thomas G. Lockhart c05f29e895 Augment the date/time examples in the User's Guide to reflect the newer
capabilities of specifying time zones as intervals per SQL9x.
Put refentrytitle contents on the same line as the tag.
 Otherwise, leading whitespace is propagated into the product, which
 (at least) messes up the ToC layout.
Remove (some) docinfo tags containing dates. Best to omit if the dates
 are not accurate; maybe use CVS dates instead or leave them out.
2002-04-21 19:02:39 +00:00

149 lines
2.8 KiB
Plaintext

<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/current_date.sgml,v 1.5 2002/04/21 19:02:39 thomas Exp $
Postgres documentation
-->
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/current_date.sgml,v 1.5 2002/04/21 19:02:39 thomas Exp $
Postgres documentation
-->
<REFENTRY ID="SQL-CURRENT-DATE">
<REFMETA>
<REFENTRYTITLE>CURRENT_DATE</REFENTRYTITLE>
<REFMISCINFO>SQL - Functions</REFMISCINFO>
</REFMETA>
<REFNAMEDIV>
<REFNAME>
CURRENT_DATE
</REFNAME>
<REFPURPOSE>
Returns the current date
</REFPURPOSE>
<REFSYNOPSISDIV>
<REFSYNOPSISDIVINFO>
<DATE>1998-04-15</DATE>
</REFSYNOPSISDIVINFO>
<SYNOPSIS>
CURRENT_DATE
</SYNOPSIS>
<REFSECT2 ID="R2-SQL-CURRENT-DATE-1">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
Inputs
</TITLE>
<PARA>
None.
</REFSECT2>
<REFSECT2 ID="R2-SQL-CURRENT-DATE-2">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
Outputs
</TITLE>
<PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
<replaceable>date</replaceable>
</TERM>
<LISTITEM>
<PARA>
Returns "<replaceable class="parameter">today</replaceable>".
</VARIABLELIST>
</REFSECT2>
</REFSYNOPSISDIV>
<REFSECT1 ID="R1-SQL-CURRENT-DATE-1">
<REFSECT1INFO>
<DATE>1998-04-15</DATE>
</REFSECT1INFO>
<TITLE>
Description
</TITLE>
<PARA>
The niladic CURRENT_DATE function has a data type of
DATE and returns the date at the time that it is run.
</PARA>
<REFSECT2 ID="R2-SQL-CURRENT-DATE-3">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
Notes
</TITLE>
<PARA>
Refer to SET DATESTYLE for further information about date format.
</PARA>
</REFSECT2>
<REFSECT1 ID="R1-SQL-CURRENT-DATE-2">
<TITLE>
Usage
</TITLE>
<PARA>
Insert the date of insertion into a row:
</PARA>
<ProgramListing>
INSERT INTO films
VALUES ('TM999','Ben Hur',105,CURRENT_DATE,'Action',NULL);
</ProgramListing>
<PARA>
Display CURRENT-DATE:
</PARA>
<ProgramListing>
SELECT CURRENT_DATE AS today;
today
------------
1998-03-31
</ProgramListing>
</REFSECT1>
<REFSECT1 ID="R1-SQL-CURRENT-DATE-3">
<TITLE>
Compatibility
</TITLE>
<PARA>
</PARA>
<REFSECT2 ID="R2-SQL-CURRENT-DATE-4">
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
</REFSECT2INFO>
<TITLE>
SQL92
</TITLE>
<PARA>
Full compatibility.
</PARA>
</refsect2>
</refsect1>
</REFENTRY>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../reference.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:"/usr/lib/sgml/catalog"
sgml-local-ecat-files:nil
End:
-->