mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
684 lines
40 KiB
INI
684 lines
40 KiB
INI
[ABS]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=ABS calculates the absolute value of a number, where that number can be a literal or an expression that evaluates to a number.
|
||
[ACOS]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=ACOS is a trigonometric function that returns the arc cosine of a number. The return value is in radians and is between PI/2 and -PI/2.
|
||
[ADD_MONTHS]
|
||
declaration=date,timestamp,integer
|
||
category=Date and Time Functions
|
||
description=ADD_MONTHS adds the specified number of months to a date or time stamp value or expression. The DATEADD function provides similar functionality.
|
||
[APPROXIMATE]
|
||
declaration=percentile,expr
|
||
category=Aggregate Functions
|
||
description=APPROXIMATE PERCENTILE_DISC is an inverse distribution function that assumes a discrete distribution model. It takes a percentile value and a sort specification and returns an element from the given set. Approximation enables the function to execute much faster, with a low relative error of around 0.5 percent.
|
||
[ASIN]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=ASIN is a trigonometric function that returns the arc sine of a number. The return value is in radians and is between PI/2 and -PI/2.
|
||
[ATAN2]
|
||
declaration=number1,number2
|
||
category=Math Functions
|
||
description=ATAN2 is a trigonometric function that returns the arc tangent of a one number divided by another number. The return value is in radians and is between PI/2 and -PI/2.
|
||
[ATAN]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=ATAN is a trigonometric function that returns the arc tangent of a number. The return value is in radians and is between PI/2 and -PI/2.
|
||
[AVG]
|
||
declaration=expression
|
||
category=Aggregate Functions
|
||
description=The AVG function returns the average (arithmetic mean) of the input expression values. The AVG function works with numeric values and ignores NULL values.
|
||
[BIT_AND]
|
||
declaration=expression
|
||
category=Bit-Wise Aggregate Functions
|
||
description=
|
||
[BIT_OR]
|
||
declaration=expression
|
||
category=Bit-Wise Aggregate Functions
|
||
description=
|
||
[BOOL_AND]
|
||
declaration=expression
|
||
category=Bit-Wise Aggregate Functions
|
||
description=
|
||
[BOOL_OR]
|
||
declaration=expression
|
||
category=Bit-Wise Aggregate Functions
|
||
description=
|
||
[BTRIM]
|
||
declaration=string,matching_string
|
||
category=String Functions
|
||
description=The BTRIM function trims a string by removing leading and trailing blanks or by removing characters that match an optional specified string.
|
||
[BTTEXT_PATTERN_CMP]
|
||
declaration=
|
||
category=String Functions
|
||
description=Synonym for the BPCHARCMP function.
|
||
[CASE]
|
||
declaration=expression,value,result,Boolean condition
|
||
category=Conditional Expressions
|
||
description=The CASE expression is a conditional expression, similar to if/then/else statements found in other languages. CASE is used to specify a result when there are multiple conditions.
|
||
[CAST]
|
||
declaration=expression,type
|
||
category=Data Type Formatting Functions
|
||
description=You can do run-time conversions between compatible data types by using the CAST and CONVERT functions.
|
||
[CBRT]
|
||
declaration=
|
||
category=Math Functions
|
||
description=The CBRT function is a mathematical function that calculates the cube root of a number.
|
||
[CEILING]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The CEILING or CEIL function is used to round a number up to the next whole number. (The FLOOR Function rounds a number down to the next whole number.)
|
||
[CEIL]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The CEILING or CEIL function is used to round a number up to the next whole number. (The FLOOR Function rounds a number down to the next whole number.)
|
||
[CHARACTER_LENGTH]
|
||
declaration=
|
||
category=String Functions
|
||
description=Synonym of the LEN function.
|
||
[CHARINDEX]
|
||
declaration=substring,string
|
||
category=String Functions
|
||
description=Returns the location of the specified substring within a string. Synonym of the STRPOS function.
|
||
[CHAR_LENGTH]
|
||
declaration=
|
||
category=String Functions
|
||
description=Synonym of the LEN function.
|
||
[CHECKSUM]
|
||
declaration=expression
|
||
category=Math Functions
|
||
description=Computes a checksum value for building a hash index.
|
||
[CHR]
|
||
declaration=number
|
||
category=String Functions
|
||
description=The CHR function returns the character that matches the ASCII code point value specified by of the input parameter.
|
||
[COALESCE]
|
||
declaration=
|
||
category=Conditional Expressions
|
||
description=Synonym of the NVL expression.
|
||
[CONCAT]
|
||
declaration=string1,string2
|
||
category=String Functions
|
||
description=The CONCAT function concatenates two character strings and returns the resulting string. To concatenate more than two strings, use nested CONCAT functions. The concatenation operator (||) between two strings produces the same results as the CONCAT function.
|
||
[CONVERT]
|
||
declaration=expression,type
|
||
category=Data Type Formatting Functions
|
||
description=You can do run-time conversions between compatible data types by using the CAST and CONVERT functions.
|
||
[CONVERT_TIMEZONE]
|
||
declaration=source_timezone,target_timezone,timestamp
|
||
category=Date and Time Functions
|
||
description=CONVERT_TIMEZONE converts a time stamp from one time zone to another.
|
||
[COS]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=COS is a trigonometric function that returns the cosine of a number. The return value is in radians and is between PI/2 and -PI/2.
|
||
[COT]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=COT is a trigonometric function that returns the cotangent of a number. The input parameter must be nonzero.
|
||
[COUNT]
|
||
declaration=expression
|
||
category=Aggregate Functions
|
||
description=The COUNT function counts the rows defined by the expression.
|
||
[CRC32]
|
||
declaration=string
|
||
category=String Functions
|
||
description=CRC32 is an error-detecting function that uses a CRC32 algorithm to detect changes between source and target data. The CRC32 function converts a variable-length string into an 8-character string that is a text representation of the hexadecimal value of a 32 bit-binary sequence.
|
||
[CUME_DIST]
|
||
declaration=partition_expression,order_list
|
||
category=Window Functions
|
||
description=Calculates the cumulative distribution of a value within a window or partition. Assuming ascending ordering, the cumulative distribution is determined using this formula:
|
||
[CURRENT_DATABASE]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the name of the database where you are currently connected.
|
||
[CURRENT_DATE]
|
||
declaration=
|
||
category=Date and Time Functions
|
||
description=CURRENT_DATE returns a date in the current session time zone (UTC by default) in the default format: YYYY-MM-DD.
|
||
[CURRENT_SCHEMAS]
|
||
declaration=include_implicit
|
||
category=System Information Functions
|
||
description=Returns an array of the names of any schemas in the current search path. The current search path is defined in the search_path parameter.
|
||
[CURRENT_SCHEMA]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the name of the schema at the front of the search path. This schema will be used for any tables or other named objects that are created without specifying a target schema.
|
||
[CURRENT_SETTING]
|
||
declaration=parameter
|
||
category=System Administration Functions
|
||
description=CURRENT_SETTING returns the current value of the specified configuration parameter.
|
||
[CURRENT_USER]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the user name of the current "effective" user of the database, as applicable to checking permissions. Usually, this user name will be the same as the session user; however, this can occasionally be changed by superusers.
|
||
[CURRENT_USER_ID]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the unique identifier for the Amazon Redshift user logged in to the current session.
|
||
[DATEADD]
|
||
declaration=datepart,interval,date,timestamp
|
||
category=Date and Time Functions
|
||
description=Increments a date or time stamp value by a specified interval.
|
||
[DATEDIFF]
|
||
declaration=datepart,datepart boundaries,date,timestamp
|
||
category=Date and Time Functions
|
||
description=DATEDIFF returns the difference between the date parts of two date or time expressions.
|
||
[DATE_CMP]
|
||
declaration=date1,date2
|
||
category=Date and Time Functions
|
||
description=DATE_CMP compares two dates. The function returns 0 if the dates are identical, 1 if date1 is greater, and -1 if date2 is greater.
|
||
[DATE_CMP_TIMESTAMPTZ]
|
||
declaration=date,timestamptz
|
||
category=Date and Time Functions
|
||
description=DATE_CMP_TIMESTAMPTZ compares a date to a time stamp with time zone. If the date and time stamp values are identical, the function returns 0. If the date is greater alphabetically, the function returns 1. If the time stamp is greater, the function returns –1.
|
||
[DATE_CMP_TIMESTAMP]
|
||
declaration=date,timestamp
|
||
category=Date and Time Functions
|
||
description=Compares a date to a time stamp and returns 0 if the values are identical, 1 if date is greater alphabetically and -1 if timestamp is greater.
|
||
[DATE_PART]
|
||
declaration=datepart,date,timestamp
|
||
category=Date and Time Functions
|
||
description=DATE_PART extracts datepart values from an expression. DATE_PART is a synonym of the PGDATE_PART function.
|
||
[DATE_PART_YEAR]
|
||
declaration=date
|
||
category=Date and Time Functions
|
||
description=The DATE_PART_YEAR function extracts the year from a date.
|
||
[DATE_TRUNC]
|
||
declaration=datepart,timestamp
|
||
category=Date and Time Functions
|
||
description=The DATE_TRUNC function truncates a time stamp expression or literal based on the date part that you specify, such as hour, week, or month. DATE_TRUNC returns the first day of the specified year, the first day of the specified month, or the Monday of the specified week.
|
||
[DECODE]
|
||
declaration=expression,search,result,default
|
||
category=Conditional Expressions
|
||
description=A DECODE expression replaces a specific value with either another specific value or a default value, depending on the result of an equality condition. This operation is equivalent to the operation of a simple CASE expression or an IF-THEN-ELSE statement.
|
||
[DEGREES]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=Converts an angle in radians to its equivalent in degrees.
|
||
[DENSE_RANK]
|
||
declaration=expr_list,order_list
|
||
category=Window Functions
|
||
description=The DENSE_RANK window function determines the rank of a value in a group of values, based on the ORDER BY expression in the OVER clause. If the optional PARTITION BY clause is present, the rankings are reset for each group of rows. Rows with equal values for the ranking criteria receive the same rank. The DENSE_RANK function differs from RANK in one respect: If two or more rows tie, there is no gap in the sequence of ranked values. For example, if two rows are ranked 1, the next rank is 2.
|
||
[DEXP]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The DEXP function returns the exponential value in scientific notation for a double precision number. The only difference between the DEXP and EXP functions is that the parameter for DEXP must be a double precision.
|
||
[DLOG10]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The DLOG10 returns the base 10 logarithm of the input parameter. Synonym of the LOG function.
|
||
[DLOG1]
|
||
declaration=
|
||
category=Math Functions
|
||
description=The DLOG1 function returns the natural logarithm of the input parameter. Synonym for the LN function.
|
||
[EXP]
|
||
declaration=expression
|
||
category=Math Functions
|
||
description=The EXP function returns the exponential value in scientific notation for a numeric expression.
|
||
[EXTRACT]
|
||
declaration=datepart,literal,timestamp
|
||
category=Date and Time Functions
|
||
description=The EXTRACT function returns a date part, such as a day, month, or year, from a time stamp value or expression.
|
||
[FIRST_VALUE]
|
||
declaration=expression,expr_list,order_list,frame_clause
|
||
category=Window Functions
|
||
description=Given an ordered set of rows, FIRST_VALUE returns the value of the specified expression with respect to the first row in the window frame. The LAST_VALUE function returns the value of the expression with respect to the last row in the frame.
|
||
[FLOOR]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The FLOOR function rounds a number down to the next whole number.
|
||
[FUNC_SHA1]
|
||
declaration=string
|
||
category=String Functions
|
||
description=The FUNC_SHA1 function uses the SHA1 cryptographic hash function to convert a variable-length string into a 40-character string that is a text representation of the hexadecimal value of a 160-bit checksum.
|
||
[GETDATE]
|
||
declaration=
|
||
category=Date and Time Functions
|
||
description=GETDATE returns the current date and time in the current session time zone (UTC by default).
|
||
[GREATEST]
|
||
declaration=expression_list
|
||
category=Conditional Expressions
|
||
description=Returns the largest value from a list of any number of expressions.
|
||
[HAS_DATABASE_PRIVILEGE]
|
||
declaration=user,database,privilege
|
||
category=System Information Functions
|
||
description=Returns true if the user has the specified privilege for the specified database. For more information about privileges, see GRANT.
|
||
[HAS_SCHEMA_PRIVILEGE]
|
||
declaration=user,schema,privilege
|
||
category=System Information Functions
|
||
description=Returns true if the user has the specified privilege for the specified schema. For more information about privileges, see GRANT.
|
||
[HAS_TABLE_PRIVILEGE]
|
||
declaration=user,table,privilege
|
||
category=System Information Functions
|
||
description=Returns true if the user has the specified privilege for the specified table.
|
||
[INITCAP]
|
||
declaration=string
|
||
category=String Functions
|
||
description=Capitalizes the first letter of each word in a specified string. INITCAP supports UTF-8 multibyte characters, up to a maximum of four bytes per character.
|
||
[INTERVAL_CMP]
|
||
declaration=interval1,interval2
|
||
category=Date and Time Functions
|
||
description=INTERVAL_CMP compares two intervals and returns 1 if the first interval is greater, -1 if the second interval is greater, and 0 if the intervals are equal. For more information, see Interval Literals.
|
||
[IS_VALID_JSON]
|
||
declaration=json_string
|
||
category=JSON Functions
|
||
description=IS_VALID_JSON validates a JSON string. The function returns Boolean true (t) if the string is properly formed JSON or false (f) if the string is malformed. To validate a JSON array, use IS_VALID_JSON_ARRAY Function
|
||
[IS_VALID_JSON_ARRAY]
|
||
declaration=json_array
|
||
category=JSON Functions
|
||
description=IS_VALID_JSON_ARRAY validates a JSON array. The function returns Boolean true (t) if the array is properly formed JSON or false (f) if the array is malformed. To validate a JSON string, use IS_VALID_JSON Function
|
||
[JSON_ARRAY_LENGTH]
|
||
declaration=json_array,null_if_invalid
|
||
category=JSON Functions
|
||
description=JSON_ARRAY_LENGTH returns the number of elements in the outer array of a JSON string. If the null_if_invalid argument is set to true and the JSON string is invalid, the function returns NULL instead of returning an error.
|
||
[JSON_EXTRACT_ARRAY_ELEMENT_TEXT]
|
||
declaration=json_string,pos,null_if_invalid
|
||
category=JSON Functions
|
||
description=JSON_EXTRACT_ARRAY_ELEMENT_TEXT returns a JSON array element in the outermost array of a JSON string, using a zero-based index. The first element in an array is at position 0. If the index is negative or out of bound, JSON_EXTRACT_ARRAY_ELEMENT_TEXT returns empty string. If the null_if_invalid argument is set to true and the JSON string is invalid, the function returns NULL instead of returning an error.
|
||
[JSON_EXTRACT_PATH_TEXT]
|
||
declaration=json_string,path_elem,null_if_invalid
|
||
category=JSON Functions
|
||
description=JSON_EXTRACT_PATH_TEXT returns the value for the key:value pair referenced by a series of path elements in a JSON string. The JSON path can be nested up to five levels deep. Path elements are case-sensitive. If a path element does not exist in the JSON string, JSON_EXTRACT_PATH_TEXT returns an empty string. If the null_if_invalid argument is set to true and the JSON string is invalid, the function returns NULL instead of returning an error.
|
||
[LAG]
|
||
declaration=value_expr,offset,window_partition,window_ordering
|
||
category=Window Functions
|
||
description=The LAG window function returns the values for a row at a given offset above (before) the current row in the partition.
|
||
[LAST_DAY]
|
||
declaration=
|
||
category=Date and Time Functions
|
||
description=LAST_DAY returns the date of the last day of the month that contains date. The return type is always DATE, regardless of the data type of the date argument.
|
||
[LAST_VALUE]
|
||
declaration=expression,expr_list,order_list,frame_clause
|
||
category=Window Functions
|
||
description=Given an ordered set of rows, FIRST_VALUE returns the value of the specified expression with respect to the first row in the window frame. The LAST_VALUE function returns the value of the expression with respect to the last row in the frame.
|
||
[LEAD]
|
||
declaration=value_expr,offset,window_partition,window_ordering
|
||
category=Window Functions
|
||
description=The LEAD window function returns the values for a row at a given offset below (after) the current row in the partition.
|
||
[LEAST]
|
||
declaration=expression_list
|
||
category=Conditional Expressions
|
||
description=Returns the smallest value from a list of any number of expressions.
|
||
[LEFT]
|
||
declaration=string,integer
|
||
category=String Functions
|
||
description=These functions return the specified number of leftmost or rightmost characters from a character string.
|
||
[LENGTH]
|
||
declaration=
|
||
category=String Functions
|
||
description=Synonym of the LEN function.
|
||
[LEN]
|
||
declaration=expression
|
||
category=String Functions
|
||
description=Returns the length of the specified string as the number of characters.
|
||
[LISTAGG]
|
||
declaration=aggregate_expression,delimiter,WITHIN GROUP (ORDER BY order_list)
|
||
category=Aggregate Functions
|
||
description=For each group in a query, the LISTAGG aggregate function orders the rows for that group according to the ORDER BY expression, then concatenates the values into a single string.
|
||
[LN]
|
||
declaration=expression
|
||
category=Math Functions
|
||
description=Returns the natural logarithm of the input parameter. Synonym of the DLOG1 function.
|
||
[LOG]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=Returns the base 10 logarithm of a number.
|
||
[LOWER]
|
||
declaration=string
|
||
category=String Functions
|
||
description=Converts a string to lowercase. LOWER supports UTF-8 multibyte characters, up to a maximum of four bytes per character.
|
||
[LPAD]
|
||
declaration=string1,length,string2
|
||
category=String Functions
|
||
description=These functions prepend or append characters to a string, based on a specified length.
|
||
[LTRIM]
|
||
declaration=string,trim_chars
|
||
category=String Functions
|
||
description=The LTRIM function trims a specified set of characters from the beginning of a string.
|
||
[MAX]
|
||
declaration=expression
|
||
category=Aggregate Functions
|
||
description=The MAX function returns the maximum value in a set of rows. DISTINCT or ALL may be used but do not affect the result.
|
||
[MD5]
|
||
declaration=string
|
||
category=String Functions
|
||
description=Uses the MD5 cryptographic hash function to convert a variable-length string into a 32-character string that is a text representation of the hexadecimal value of a 128-bit checksum.
|
||
[MEDIAN]
|
||
declaration=median_expression
|
||
category=Aggregate Functions
|
||
description=Calculates the median value for the range of values. NULL values in the range are ignored.
|
||
[MIN]
|
||
declaration=expression
|
||
category=Aggregate Functions
|
||
description=The MIN function returns the minimum value in a set of rows. DISTINCT or ALL may be used but do not affect the result.
|
||
[MOD]
|
||
declaration=number1,number2
|
||
category=Math Functions
|
||
description=The MOD function returns a numeric result that is the remainder of two numeric parameters. The first parameter is divided by the second parameter.
|
||
[MONTHS_BETWEEN]
|
||
declaration=date1,date2
|
||
category=Date and Time Functions
|
||
description=MONTHS_BETWEEN determines the number of months between two dates.
|
||
[NEXT_DAY]
|
||
declaration=date,timestamp,day
|
||
category=Date and Time Functions
|
||
description=NEXT_DAY returns the date of the first instance of the specified day that is later than the given date.
|
||
[NTH_VALUE]
|
||
declaration=expr,offset,window_partition,window_ordering,frame_clause
|
||
category=Window Functions
|
||
description=The NTH_VALUE window function returns the expression value of the specified row of the window frame relative to the first row of the window.
|
||
[NTILE]
|
||
declaration=expr,window_partition,window_ordering
|
||
category=Window Functions
|
||
description=The NTILE window function divides ordered rows in the partition into the specified number of ranked groups of as equal size as possible and returns the group that a given row falls into.
|
||
[NULLIF]
|
||
declaration=expression1, expression2
|
||
category=Conditional Expressions
|
||
description=The NULLIF expression compares two arguments and returns null if the arguments are equal.
|
||
[NVL2]
|
||
declaration=expression,not_null_return_value,null_return_value
|
||
category=Conditional Expressions
|
||
description=Returns one of two values based on whether a specified expression evaluates to NULL or NOT NULL.
|
||
[NVL]
|
||
declaration=
|
||
category=Conditional Expressions
|
||
description=An NVL expression is identical to a COALESCE expression. NVL and COALESCE are synonyms.
|
||
[OCTET_LENGTH]
|
||
declaration=expression
|
||
category=String Functions
|
||
description=Returns the length of the specified string as the number of bytes.
|
||
[PERCENTILE_CONT]
|
||
declaration=percentile,expr
|
||
category=Aggregate Functions
|
||
description=PERCENTILE_CONT is an inverse distribution function that assumes a continuous distribution model. It takes a percentile value and a sort specification, and returns an interpolated value that would fall into the given percentile value with respect to the sort specification.
|
||
[PERCENTILE_DISC]
|
||
declaration=percentile,expr
|
||
category=Aggregate Functions
|
||
description=APPROXIMATE PERCENTILE_DISC is an inverse distribution function that assumes a discrete distribution model. It takes a percentile value and a sort specification and returns an element from the given set. Approximation enables the function to execute much faster, with a low relative error of around 0.5 percent.
|
||
[PERCENT_RANK]
|
||
declaration=partition_expression,order_list
|
||
category=Window Functions
|
||
description=Calculates the percent rank of a given row. The percent rank is determined using this formula:
|
||
[PG_BACKEND_PID]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the process ID (PID) of the server process handling the current session.
|
||
[PG_CANCEL_BACKEND]
|
||
declaration=pid
|
||
category=System Administration Functions
|
||
description=Cancels a query. PG_CANCEL_BACKEND is functionally equivalent to the CANCEL command. You can cancel queries currently being run by your user. Superusers can cancel any query.
|
||
[PG_GET_COLS]
|
||
declaration=name
|
||
category=System Information Functions
|
||
description=Returns the column metadata for a table or view definition.
|
||
[PG_GET_LATE_BINDING_VIEW_COLS]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the column metadata for all late-binding views in the database. For more information, see Late-Binding Views
|
||
[PG_LAST_COPY_COUNT]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the number of rows that were loaded by the last COPY command executed in the current session. PG_LAST_COPY_COUNT is updated with the last COPY ID, which is the query ID of the last COPY that began the load process, even if the load failed. The query ID and COPY ID are updated when the COPY command begins the load process.
|
||
[PG_LAST_COPY_ID]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the query ID of the most recently executed COPY command in the current session. If no COPY commands have been executed in the current session, PG_LAST_COPY_ID returns -1.
|
||
[PG_LAST_QUERY_ID]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the query ID of the most recently executed query in the current session. If no queries have been executed in the current session, PG_LAST_QUERY_ID returns -1. PG_LAST_QUERY_ID does not return the query ID for queries that execute exclusively on the leader node. For more information, see Leader Node–Only Functions.
|
||
[PG_LAST_UNLOAD_COUNT]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the number of rows that were unloaded by the last UNLOAD command executed in the current session. PG_LAST_UNLOAD_COUNT is updated with the query ID of the last UNLOAD, even if the operation failed. The query ID is updated when the UNLOAD is executed. If the UNLOAD fails because of a syntax error or because of insufficient privileges, PG_LAST_UNLOAD_COUNT returns the count for the previous UNLOAD. If no UNLOAD commands were executed in the current session, or if the last UNLOAD failed during the unload operation, PG_LAST_UNLOAD_COUNT returns 0.
|
||
[PG_LAST_UNLOAD_ID]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the query ID of the most recently executed UNLOAD command in the current session. If no UNLOAD commands have been executed in the current session, PG_LAST_UNLOAD_ID returns -1.
|
||
[PG_TERMINATE_BACKEND]
|
||
declaration=pid
|
||
category=System Administration Functions
|
||
description=Terminates a session. You can terminate a session owned by your user. A superuser can terminate any session.
|
||
[PI]
|
||
declaration=
|
||
category=Math Functions
|
||
description=The PI function returns the value of PI to 14 decimal places.
|
||
[POSITION]
|
||
declaration=substring,string
|
||
category=String Functions
|
||
description=Returns the location of the specified substring within a string.
|
||
[POWER]
|
||
declaration=expression1,expression2
|
||
category=Math Functions
|
||
description=The POWER function is an exponential function that raises a numeric expression to the power of a second numeric expression.
|
||
[QUOTE_IDENT]
|
||
declaration=string
|
||
category=String Functions
|
||
description=The QUOTE_IDENT function returns the specified string as a double quoted string so that it can be used as an identifier in a SQL statement. Appropriately doubles any embedded double quotes.
|
||
[QUOTE_LITERAL]
|
||
declaration=string
|
||
category=String Functions
|
||
description=The QUOTE_LITERAL function returns the specified string as a quoted string so that it can be used as a string literal in a SQL statement. If the input parameter is a number, QUOTE_LITERAL treats it as a string. Appropriately doubles any embedded single quotes and backslashes.
|
||
[RADIANS]
|
||
declaration=string
|
||
category=Math Functions
|
||
description=Converts an angle in degrees to its equivalent in radians.
|
||
[RANDOM]
|
||
declaration=
|
||
category=Math Functions
|
||
description=The RANDOM function generates a random value between 0.0 and 1.0.
|
||
[RANK]
|
||
declaration=expr_list,order_list
|
||
category=Window Functions
|
||
description=The RANK window function determines the rank of a value in a group of values, based on the ORDER BY expression in the OVER clause. If the optional PARTITION BY clause is present, the rankings are reset for each group of rows. Rows with equal values for the ranking criteria receive the same rank. Amazon Redshift adds the number of tied rows to the tied rank to calculate the next rank and thus the ranks might not be consecutive numbers. For example, if two rows are ranked 1, the next rank is 3.
|
||
[RATIO_TO_REPORT]
|
||
declaration=ratio_expression,partition_expression
|
||
category=Window Functions
|
||
description=Calculates the ratio of a value to the sum of the values in a window or partition. The ratio to report value is determined using the formula:
|
||
[REGEXP_COUNT]
|
||
declaration=source_string,pattern,position
|
||
category=String Functions
|
||
description=Searches a string for a regular expression pattern and returns an integer that indicates the number of times the pattern occurs in the string. If no match is found, then the function returns 0. For more information about regular expressions, see POSIX Operators.
|
||
[REGEXP_INSTR]
|
||
declaration=source_string,pattern,position,occurrence,option,parameters
|
||
category=String Functions
|
||
description=Searches a string for a regular expression pattern and returns an integer that indicates the beginning position or ending position of the matched substring. If no match is found, then the function returns 0. REGEXP_INSTR is similar to the POSITION function, but lets you search a string for a regular expression pattern. For more information about regular expressions, see POSIX Operators.
|
||
[REGEXP_REPLACE]
|
||
declaration=source_string,pattern,replace_string,position
|
||
category=String Functions
|
||
description=Searches a string for a regular expression pattern and replaces every occurrence of the pattern with the specified string. REGEXP_REPLACE is similar to the REPLACE Function, but lets you search a string for a regular expression pattern. For more information about regular expressions, see POSIX Operators.
|
||
[REGEXP_SUBSTR]
|
||
declaration=source_string,pattern,position,occurrence,parameters
|
||
category=String Functions
|
||
description=Returns the characters extracted from a string by searching for a regular expression pattern. REGEXP_SUBSTR is similar to the SUBSTRING Function function, but lets you search a string for a regular expression pattern. For more information about regular expressions, see POSIX Operators.
|
||
[REPEAT]
|
||
declaration=string,integer
|
||
category=String Functions
|
||
description=Repeats a string the specified number of times. If the input parameter is numeric, REPEAT treats it as a string.
|
||
[REPLACE]
|
||
declaration=string,old_chars,new_chars,old_string
|
||
category=String Functions
|
||
description=Replaces all occurrences of a set of characters within an existing string with other specified characters.
|
||
[REPLICATE]
|
||
declaration=
|
||
category=String Functions
|
||
description=Synonym for the REPEAT function.
|
||
[REVERSE]
|
||
declaration=expression
|
||
category=String Functions
|
||
description=The REVERSE function operates on a string and returns the characters in reverse order. For example, reverse('abcde') returns edcba. This function works on numeric and date data types as well as character data types; however, in most cases it has practical value for character strings.
|
||
[RIGHT]
|
||
declaration=string,integer
|
||
category=String Functions
|
||
description=These functions return the specified number of leftmost or rightmost characters from a character string.
|
||
[ROUND]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The ROUND function rounds numbers to the nearest integer or decimal.
|
||
[ROW_NUMBER]
|
||
declaration=expr_list,order_list
|
||
category=Window Functions
|
||
description=Determines the ordinal number of the current row within a group of rows, counting from 1, based on the ORDER BY expression in the OVER clause. If the optional PARTITION BY clause is present, the ordinal numbers are reset for each group of rows. Rows with equal values for the ORDER BY expressions receive the different row numbers nondeterministically.
|
||
[RPAD]
|
||
declaration=string1,length,string2
|
||
category=String Functions
|
||
description=These functions prepend or append characters to a string, based on a specified length.
|
||
[RTRIM]
|
||
declaration=string,trim_chars
|
||
category=String Functions
|
||
description=The RTRIM function trims a specified set of characters from the end of a string.
|
||
[SESSION_USER]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns the name of the user associated with the current session. This is the user who initiated the current database connection.
|
||
[SET_CONFIG]
|
||
declaration=parameter,new_value,is_local
|
||
category=System Administration Functions
|
||
description=Sets a configuration parameter to a new setting.
|
||
[SIGN]
|
||
declaration=numeric
|
||
category=Math Functions
|
||
description=The SIGN function returns the sign (positive or negative) of a numeric value. The result of the SIGN function will be a 1, -1, or 0 indicating the sign of the argument.
|
||
[SIN]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=SIN is a trigonometric function that returns the sine of a number. The return value is in radians and is between PI/2 and -PI/2.
|
||
[SLICE_NUM]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Returns an integer corresponding to the slice number in the cluster where the data for a row is located. SLICE_NUM takes no parameters.
|
||
[SPLIT_PART]
|
||
declaration=string,delimiter,part
|
||
category=String Functions
|
||
description=Splits a string on the specified delimiter and returns the part at the specified position.
|
||
[SQRT]
|
||
declaration=expression
|
||
category=Math Functions
|
||
description=The SQRT function returns the square root of a numeric value.
|
||
[STDDEV_POP]
|
||
declaration=
|
||
category=Aggregate Functions
|
||
description=The STDDEV_SAMP and STDDEV_POP functions return the sample and population standard deviation of a set of numeric values (integer, decimal, or floating-point). The result of the STDDEV_SAMP function is equivalent to the square root of the sample variance of the same set of values.
|
||
[STDDEV_SAMP]
|
||
declaration=
|
||
category=Aggregate Functions
|
||
description=The STDDEV_SAMP and STDDEV_POP functions return the sample and population standard deviation of a set of numeric values (integer, decimal, or floating-point). The result of the STDDEV_SAMP function is equivalent to the square root of the sample variance of the same set of values.
|
||
[STRPOS]
|
||
declaration=string,substring
|
||
category=String Functions
|
||
description=Returns the position of a substring within a specified string.
|
||
[STRTOL]
|
||
declaration=num_string,base
|
||
category=String Functions
|
||
description=Converts a string expression of a number of the specified base to the equivalent integer value. The converted value must be within the signed 64-bit range.
|
||
[SUBSTRING]
|
||
declaration=string,start_position,number_characters
|
||
category=String Functions
|
||
description=Returns the characters extracted from a string based on the specified character position for a specified number of characters.
|
||
[SUM]
|
||
declaration=expression
|
||
category=Aggregate Functions
|
||
description=The SUM function returns the sum of the input column or expression values. The SUM function works with numeric values and ignores NULL values.
|
||
[SYSDATE]
|
||
declaration=
|
||
category=Date and Time Functions
|
||
description=SYSDATE returns the current date and time in the current session time zone (UTC by default).
|
||
[TAN]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=TAN is a trigonometric function that returns the tangent of a number. The input parameter must be a non-zero number (in radians).
|
||
[TEXTLEN]
|
||
declaration=
|
||
category=String Functions
|
||
description=Synonym of LEN function.
|
||
[TIMEOFDAY]
|
||
declaration=
|
||
category=Date and Time Functions
|
||
description=TIMEOFDAY is a special alias used to return the weekday, date, and time as a string value.
|
||
[TIMESTAMPTZ_CMP]
|
||
declaration=timestamptz1,timestamptz2
|
||
category=Date and Time Functions
|
||
description=TIMESTAMPTZ_CMP compares the value of two time stamp with time zone values and returns an integer. If the time stamps are identical, the function returns 0. If the first time stamp is greater alphabetically, the function returns 1. If the second time stamp is greater, the function returns –1.
|
||
[TIMESTAMPTZ_CMP_DATE]
|
||
declaration=timestamptz,date
|
||
category=Date and Time Functions
|
||
description=TIMESTAMPTZ_CMP_DATE compares the value of a time stamp and a date. If the time stamp and date values are identical, the function returns 0. If the time stamp is greater alphabetically, the function returns 1. If the date is greater, the function returns –1.
|
||
[TIMESTAMPTZ_CMP_TIMESTAMP]
|
||
declaration=timestamptz,timestamp
|
||
category=Date and Time Functions
|
||
description=TIMESTAMPTZ_CMP_TIMESTAMP compares the value of a time stamp with time zone expression with a time stamp expression. If the time stamp with time zone and time stamp values are identical, the function returns 0. If the time stamp with time zone is greater alphabetically, the function returns 1. If the time stamp is greater, the function returns –1.
|
||
[TIMESTAMP_CMP]
|
||
declaration=timestamp1,timestamp2
|
||
category=Date and Time Functions
|
||
description=Compares the value of two time stamps and returns an integer. If the time stamps are identical, the function returns 0. If the first time stamp is greater alphabetically, the function returns 1. If the second time stamp is greater, the function returns –1.
|
||
[TIMESTAMP_CMP_DATE]
|
||
declaration=timestamp,date
|
||
category=Date and Time Functions
|
||
description=TIMESTAMP_CMP_DATE compares the value of a time stamp and a date. If the time stamp and date values are identical, the function returns 0. If the time stamp is greater alphabetically, the function returns 1. If the date is greater, the function returns –1.
|
||
[TIMESTAMP_CMP_TIMESTAMPTZ]
|
||
declaration=timestamp,timestamptz
|
||
category=Date and Time Functions
|
||
description=TIMESTAMP_CMP_TIMESTAMPTZ compares the value of a time stamp expression with a time stamp with time zone expression. If the time stamp and time stamp with time zone values are identical, the function returns 0. If the time stamp is greater alphabetically, the function returns 1. If the time stamp with time zone is greater, the function returns –1.
|
||
[TIMEZONE]
|
||
declaration=timezone,timestamp,timestamptz
|
||
category=Date and Time Functions
|
||
description=TIMEZONE returns a time stamp for the specified time zone and time stamp value.
|
||
[TO_CHAR]
|
||
declaration=timestamp_expression,numeric_expression,format
|
||
category=Data Type Formatting Functions
|
||
description=TO_CHAR converts a time stamp or numeric expression to a character-string data format.
|
||
[TO_DATE]
|
||
declaration=string,format
|
||
category=Data Type Formatting Functions
|
||
description=TO_DATE converts a date represented in a character string to a DATE data type.
|
||
[TO_HEX]
|
||
declaration=number
|
||
category=Math Functions
|
||
description=The TO_HEX function converts a number to its equivalent hexadecimal value.
|
||
[TO_NUMBER]
|
||
declaration=string,format
|
||
category=Data Type Formatting Functions
|
||
description=TO_NUMBER converts a string to a numeric (decimal) value.
|
||
[TO_TIMESTAMP]
|
||
declaration=timestamp,format
|
||
category=Date and Time Functions
|
||
description=TO_TIMESTAMP converts a TIMESTAMP string to TIMESTAMPTZ.
|
||
[TRANSLATE]
|
||
declaration=expression,characters_to_replace,characters_to_substitute
|
||
category=String Functions
|
||
description=For a given expression, replaces all occurrences of specified characters with specified substitutes. Existing characters are mapped to replacement characters by their positions in the characters_to_replace and characters_to_substitute arguments. If more characters are specified in the characters_to_replace argument than in the characters_to_substitute argument, the extra characters from the characters_to_replace argument are omitted in the return value.
|
||
[TRIM]
|
||
declaration=characters,string
|
||
category=String Functions
|
||
description=The TRIM function trims a string by removing leading and trailing blanks or by removing characters that match an optional specified string.
|
||
[TRUNC]
|
||
declaration=number,integer,timestamp
|
||
category=Math Functions
|
||
description=The TRUNC function truncates a number and right-fills it with zeros from the position specified. This function also truncates a time stamp and returns a date.
|
||
[TRUNC]
|
||
declaration=timestamp
|
||
category=Date and Time Functions
|
||
description=Truncates a time stamp and returns a date.
|
||
[UPPER]
|
||
declaration=string
|
||
category=String Functions
|
||
description=Converts a string to uppercase. UPPER supports UTF-8 multibyte characters, up to a maximum of four bytes per character.
|
||
[USER]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=Synonym for CURRENT_USER. See CURRENT_USER.
|
||
[VAR_POP]
|
||
declaration=
|
||
category=Aggregate Functions
|
||
description=The VAR_SAMP and VAR_POP functions return the sample and population variance of a set of numeric values (integer, decimal, or floating-point). The result of the VAR_SAMP function is equivalent to the squared sample standard deviation of the same set of values.
|
||
[VAR_SAMP]
|
||
declaration=
|
||
category=Aggregate Functions
|
||
description=The VAR_SAMP and VAR_POP functions return the sample and population variance of a set of numeric values (integer, decimal, or floating-point). The result of the VAR_SAMP function is equivalent to the squared sample standard deviation of the same set of values.
|
||
[VERSION]
|
||
declaration=
|
||
category=System Information Functions
|
||
description=The VERSION() function returns details about the currently installed release, with specific Amazon Redshift version information at the end. |