The cl-postgres-datetime Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-postgres-datetime Reference Manual

This is the cl-postgres-datetime Reference Manual, version 0.1.0, generated automatically by Declt version 2.4 patchlevel 1 "Will Decker" on Fri May 24 08:21:24 2019 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

cl-postgres-datetime

cl-postgres-datetime provides date/time integration for cl-postgres.

It uses local-time for types that use time zones (i.e. timestamptz) and simple-date for types that don't (i.e. timestamp, date, time, interval).

Why?

Neither local-time nor simple-date alone work well with all the date/time types that Postgres supports.

local-time's TIMESTAMP is a natural fit for timestamptz, and while non-timezone types like timestamp and date could be parsed into it, the user has to remember to always use +UTC-ZONE+ when decoding such a timestamp (the values of decoded components may mismatch with the original if the default time zone were different from UTC).

simple-date has no concept of time zones, so while it works well for every type that doesn't need a timezone, it fails badly when it comes to timestamptz.

Installation

As of now, the library is not available in Quicklisp, so you will need to clone the repository and load it manually.

Usage

Once the library is loaded in your image, just use update-sql-readtable to update the readtable in cl-postgres.

(setf cl-postgres:*sql-readtable* (cl-postgres-datetime:update-sql-readtable cl-postgres:*sql-readtable*))

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-postgres-datetime

Author

Chaitanya Gupta <mail@chaitanyagupta.com>

License

BSD-3-Clause

Description

Date/time integration for cl-postgres that uses LOCAL-TIME for types that use time zones and SIMPLE-DATE for those that don’t

Version

0.1.0

Dependencies
Source

cl-postgres-datetime.asd (file)

Component

cl-postgres-datetime.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-postgres-datetime.asd

Location

cl-postgres-datetime.asd

Systems

cl-postgres-datetime (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-postgres-datetime/cl-postgres-datetime.lisp

Parent

cl-postgres-datetime (system)

Location

cl-postgres-datetime.lisp

Packages

cl-postgres-datetime

Exported Definitions

update-sql-readtable (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-postgres-datetime

Source

cl-postgres-datetime.lisp (file)

Use List
Exported Definitions

update-sql-readtable (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: update-sql-readtable READTABLE
Package

cl-postgres-datetime

Source

cl-postgres-datetime.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +postgres-day-offset+
Package

cl-postgres-datetime

Source

cl-postgres-datetime.lisp (file)

Constant: +usecs-in-one-day+
Package

cl-postgres-datetime

Source

cl-postgres-datetime.lisp (file)

Constant: +usecs-in-one-sec+
Package

cl-postgres-datetime

Source

cl-postgres-datetime.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-postgres-datetime.asd: The cl-postgres-datetime<dot>asd file
cl-postgres-datetime/cl-postgres-datetime.lisp: The cl-postgres-datetime/cl-postgres-datetime<dot>lisp file

F
File, Lisp, cl-postgres-datetime.asd: The cl-postgres-datetime<dot>asd file
File, Lisp, cl-postgres-datetime/cl-postgres-datetime.lisp: The cl-postgres-datetime/cl-postgres-datetime<dot>lisp file

L
Lisp File, cl-postgres-datetime.asd: The cl-postgres-datetime<dot>asd file
Lisp File, cl-postgres-datetime/cl-postgres-datetime.lisp: The cl-postgres-datetime/cl-postgres-datetime<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   U  
Index Entry  Section

F
Function, update-sql-readtable: Exported functions

U
update-sql-readtable: Exported functions

Jump to:   F   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+postgres-day-offset+: Internal constants
+usecs-in-one-day+: Internal constants
+usecs-in-one-sec+: Internal constants

C
Constant, +postgres-day-offset+: Internal constants
Constant, +usecs-in-one-day+: Internal constants
Constant, +usecs-in-one-sec+: Internal constants

Jump to:   +  
C  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-postgres-datetime: The cl-postgres-datetime system
cl-postgres-datetime: The cl-postgres-datetime package

P
Package, cl-postgres-datetime: The cl-postgres-datetime package

S
System, cl-postgres-datetime: The cl-postgres-datetime system

Jump to:   C   P   S