Skip to content

Commit 48a8971

Browse files
authored
Merge pull request #4051 from McDic/feature/interval-docs
Improve docstring of `Interval` type
2 parents db6730c + 792a6aa commit 48a8971

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

diesel/src/sql_types/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,13 @@ pub struct Date;
299299
///
300300
/// - [`PgInterval`] which can be constructed using [`IntervalDsl`]
301301
/// - [`chrono::Duration`][Duration] with `feature = "chrono"`
302+
/// (There might be some information loss due to special behavior for literal `month` (or longer) intervals;
303+
/// Please read official documentation of [PostgreSQL Interval].)
302304
///
303305
/// [`PgInterval`]: ../pg/data_types/struct.PgInterval.html
304306
/// [`IntervalDsl`]: ../pg/expression/extensions/trait.IntervalDsl.html
305307
/// [Duration]: https://docs.rs/chrono/*/chrono/type.Duration.html
308+
/// [PostgreSQL Interval]: https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-INTERVAL-INPUT
306309
#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
307310
#[diesel(postgres_type(oid = 1186, array_oid = 1187))]
308311
pub struct Interval;

0 commit comments

Comments
 (0)