Zapytanie:
update enquiry_address_data
set address_line_1 = upper(regexp_replace(btrim(address_line_1), "s+", " "));
zwraca
ERROR: function regexp_replace(text, "unknown", "unknown") does not exist
Hint: No function matches the given name and argument types. You may need to add explicit type casts.
Dodałem rzutowania typu jawnego, takie jak:
update enquiry_address_data
set address_line_1 = upper(regexp_replace(btrim(address_line_1), "s+" :: text, " " :: text));
wciąż rozumiem
ERROR: function regexp_replace(text, character varying, character varying) does not exist
Hint: No function matches the given name and argument types. You may need to add explicit type casts.
Używam sterownika JDBC PostgreSql 9.3 podłączonego do instancji Amazon RedShift
Odpowiedzi:
3 dla odpowiedzi № 1Redshift nie ma regexp_replace
, to ścięty widelec starej wersji PostgreSQL z wieloma dodatkami.
Zobacz dokumentację Redshift. Zobacz też df pg_catalog.*
lub df pg_catalog.*regexp*
.
2 dla odpowiedzi nr 2
regexp_replace
jest jednym z wielu nieobsługiwane funkcje PostgreSQL w redshift.
Te funkcje są dodawane jeden po drugim - spójrz na historia dokumentacji.