This section explains the relationship between the Java function data type and the Java application data type.
Use the mapping shown in the table below to implement the relationship between the Java function to be registered using CREATE FUNCTION and the arguments and return values of the Java application. If the method names match but the Java application data types do not match, the Java function cannot be executed and returns an error.
Java function data type | Java application data type |
---|---|
void | void |
character | java.lang.String |
national character | java.lang.String |
character varying | java.lang.String |
national character varying | java.lang.String |
text | java.lang.String |
bytea | byte[] |
smallint | short |
integer | int |
bigint | long |
smallserial | short |
serial | int |
bigserial | long |
real | float |
double precision | double |
date | java.sql.Date |
time with time zone | java.sql.Time |
time without time zone | java.sql.Time |
timestamp without time zone | java.sql.Timestamp |
timestamp with time zone | java.sql.Timestamp |
boolean | boolean |
Note
In the Java function, the following data types cannot be used:
numeric
decimal
money
interval
bit
bit varying
xml
array
uuid
point
box
lseg
path
polygon
circle
json
Network address type (inet, cidr, macaddr)
Types related to text searches (tsvector, tsquery)
Enumerated type
Composite type
Range type
Object identifier data type
Pseudo-data types (except void)