1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Clean up references to SQL92

In most cases, these were just references to the SQL standard in
general.  In a few cases, a contrast was made between SQL92 and later
standards -- those have been kept unchanged.
This commit is contained in:
Peter Eisentraut
2013-04-20 11:04:41 -04:00
parent 6e481ebff6
commit cc26ea9fe2
25 changed files with 65 additions and 67 deletions

View File

@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* date.c
* implements DATE and TIME data types specified in SQL-92 standard
* implements DATE and TIME data types specified in SQL standard
*
* Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
* Portions Copyright (c) 1994-5, Regents of the University of California
@ -1403,9 +1403,9 @@ time_smaller(PG_FUNCTION_ARGS)
PG_RETURN_TIMEADT((time1 < time2) ? time1 : time2);
}
/* overlaps_time() --- implements the SQL92 OVERLAPS operator.
/* overlaps_time() --- implements the SQL OVERLAPS operator.
*
* Algorithm is per SQL92 spec. This is much harder than you'd think
* Algorithm is per SQL spec. This is much harder than you'd think
* because the spec requires us to deliver a non-null answer in some cases
* where some of the inputs are null.
*/
@ -2273,9 +2273,9 @@ timetz_mi_interval(PG_FUNCTION_ARGS)
PG_RETURN_TIMETZADT_P(result);
}
/* overlaps_timetz() --- implements the SQL92 OVERLAPS operator.
/* overlaps_timetz() --- implements the SQL OVERLAPS operator.
*
* Algorithm is per SQL92 spec. This is much harder than you'd think
* Algorithm is per SQL spec. This is much harder than you'd think
* because the spec requires us to deliver a non-null answer in some cases
* where some of the inputs are null.
*/

View File

@ -1558,8 +1558,8 @@ overflow:
* Returns 0 if successful, DTERR code if bogus input detected.
*
* Note that support for time zone is here for
* SQL92 TIME WITH TIME ZONE, but it reveals
* bogosity with SQL92 date/time standards, since
* SQL TIME WITH TIME ZONE, but it reveals
* bogosity with SQL date/time standards, since
* we must infer a time zone from current time.
* - thomas 2000-03-10
* Allow specifying date to get a better time zone,

View File

@ -1922,7 +1922,7 @@ float8_avg(PG_FUNCTION_ARGS)
sumX = transvalues[1];
/* ignore sumX2 */
/* SQL92 defines AVG of no values to be NULL */
/* SQL defines AVG of no values to be NULL */
if (N == 0.0)
PG_RETURN_NULL();

View File

@ -42,7 +42,7 @@
*
* Keith Parks. <keith@mtcc.demon.co.uk>
*
* SQL92 lets you specify the escape character by saying
* SQL lets you specify the escape character by saying
* LIKE <pattern> ESCAPE <escape character>. We are a small operation
* so we force you to use '\'. - ay 7/95
*

View File

@ -2645,7 +2645,7 @@ numeric_avg(PG_FUNCTION_ARGS)
N = DatumGetNumeric(transdatums[0]);
sumX = DatumGetNumeric(transdatums[1]);
/* SQL92 defines AVG of no values to be NULL */
/* SQL defines AVG of no values to be NULL */
/* N is zero iff no digits (cf. numeric_uminus) */
if (NUMERIC_NDIGITS(N) == 0)
PG_RETURN_NULL();
@ -2824,7 +2824,7 @@ numeric_stddev_pop(PG_FUNCTION_ARGS)
* purposes. (The latter two therefore don't really belong in this file,
* but we keep them here anyway.)
*
* Because SQL92 defines the SUM() of no values to be NULL, not zero,
* Because SQL defines the SUM() of no values to be NULL, not zero,
* the initial condition of the transition data value needs to be NULL. This
* means we can't rely on ExecAgg to automatically insert the first non-null
* data value into the transition data: it doesn't know how to do the type
@ -3046,7 +3046,7 @@ int8_avg(PG_FUNCTION_ARGS)
elog(ERROR, "expected 2-element int8 array");
transdata = (Int8TransTypeData *) ARR_DATA_PTR(transarray);
/* SQL92 defines AVG of no values to be NULL */
/* SQL defines AVG of no values to be NULL */
if (transdata->count == 0)
PG_RETURN_NULL();

View File

@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* timestamp.c
* Functions for the built-in SQL92 types "timestamp" and "interval".
* Functions for the built-in SQL types "timestamp" and "interval".
*
* Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
@ -2276,9 +2276,9 @@ interval_hash(PG_FUNCTION_ARGS)
#endif
}
/* overlaps_timestamp() --- implements the SQL92 OVERLAPS operator.
/* overlaps_timestamp() --- implements the SQL OVERLAPS operator.
*
* Algorithm is per SQL92 spec. This is much harder than you'd think
* Algorithm is per SQL spec. This is much harder than you'd think
* because the spec requires us to deliver a non-null answer in some cases
* where some of the inputs are null.
*/
@ -3129,7 +3129,7 @@ interval_avg(PG_FUNCTION_ARGS)
memcpy((void *) &sumX, DatumGetPointer(transdatums[0]), sizeof(Interval));
memcpy((void *) &N, DatumGetPointer(transdatums[1]), sizeof(Interval));
/* SQL92 defines AVG of no values to be NULL */
/* SQL defines AVG of no values to be NULL */
if (N.time == 0)
PG_RETURN_NULL();

View File

@ -720,18 +720,18 @@ charlen_to_bytelen(const char *p, int n)
* - string length
*
* If the starting position is zero or less, then return from the start of the string
* adjusting the length to be consistent with the "negative start" per SQL92.
* adjusting the length to be consistent with the "negative start" per SQL.
* If the length is less than zero, return the remaining string.
*
* Added multibyte support.
* - Tatsuo Ishii 1998-4-21
* Changed behavior if starting position is less than one to conform to SQL92 behavior.
* Changed behavior if starting position is less than one to conform to SQL behavior.
* Formerly returned the entire string; now returns a portion.
* - Thomas Lockhart 1998-12-10
* Now uses faster TOAST-slicing interface
* - John Gray 2002-02-22
* Remove "#ifdef MULTIBYTE" and test for encoding_max_length instead. Change
* behaviors conflicting with SQL92 to meet SQL92 (if E = S + L < S throw
* behaviors conflicting with SQL to meet SQL (if E = S + L < S throw
* error; if E < 1, return '', not entire string). Fixed MB related bug when
* S > LC and < LC + 4 sometimes garbage characters are returned.
* - Joe Conway 2002-08-10
@ -1023,7 +1023,7 @@ text_overlay(text *t1, text *t2, int sp, int sl)
/*
* textpos -
* Return the position of the specified substring.
* Implements the SQL92 POSITION() function.
* Implements the SQL POSITION() function.
* Ref: A Guide To The SQL Standard, Date & Darwen, 1997
* - thomas 1997-07-27
*/
@ -1903,7 +1903,7 @@ bytea_catenate(bytea *t1, bytea *t2)
* - string length (optional)
*
* If the starting position is zero or less, then return from the start of the string
* adjusting the length to be consistent with the "negative start" per SQL92.
* adjusting the length to be consistent with the "negative start" per SQL.
* If the length is less than zero, an ERROR is thrown. If no third argument
* (length) is provided, the length to the end of the string is assumed.
*/
@ -2046,7 +2046,7 @@ bytea_overlay(bytea *t1, bytea *t2, int sp, int sl)
/*
* byteapos -
* Return the position of the specified substring.
* Implements the SQL92 POSITION() function.
* Implements the SQL POSITION() function.
* Cloned from textpos and modified as required.
*/
Datum