I work with databases probably more than the next guy. Along those lines I spent a few minutes to compose a list of functions that I think are a healthy starting point for “core functionality.” There are some things so basic I did not bother to include them (like trim). I think the list below can get the average developer pretty good mileage and it would be in the interests of most database vendors to support this list.

greatest
least

timestamp_to_epoch
time_to_epoch
date_to_epoch
epoch_to_date
epoch_to_time
epoch_to_timestamp

to_timestamp(value,format)
to_char(value,format)
to_date(value,format)
to_time(value,format)

bitwise_shift_left
bitwise_shift_right
bitwise_and
bitwise_or
bitwise_xor
bitwise_not

ascii
chr

quote_literal
quote_ident

repeat

to_hex
from_hex
to_base64
from_base64

get_byte
set_byte
get_bit
set_bit

md5

sprintf

translate
replace

sleep

row_to_json
json_to_row

get_json_object
set_json_object

row_to_xml
xml_to_row

get_xml_object
set_xml_object

concat
concat_ws

uuid
guid

if

reverse

 

regex_replace

regex_match

[aggregrate]
bit_and
bit_or
bit_xor
bit_not
concat
concat_ws

[table function]
sequence
build_ngrams
top_ngrams
sentences
regex_split
strtok_split
string_split

About these ads