CREATE FUNCTION abstime_datetime(int4)
RETURNS datetime
AS '/' LANGUAGE 'internal';
CREATE FUNCTION datetime(int4)
RETURNS datetime
AS 'select abstime_datetime($1)' LANGUAGE 'SQL';
CREATE FUNCTION reltime_timespan(int4)
RETURNS timespan
AS '/' LANGUAGE 'internal';
CREATE FUNCTION timespan(int4)
RETURNS timespan
AS 'select reltime_timespan($1)' LANGUAGE 'SQL';
라는 function에 대해 잘 모르겠습니다.
막상 function를 만들려고 하면 에러가 납니다.
psql:/usr/local/postgresql/7.0.2/contrib/unixdate/unixdate.sql:21: ERROR: Only users with Postgres superuser privilege are permitted to create a function in the 'internal' language. Others may use the 'sql' language or the created procedural languages.
psql:/usr/local/postgresql/7.0.2/contrib/unixdate/unixdate.sql:25: ERROR: Function 'abstime_datetime(int4)' does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
psql:/usr/local/postgresql/7.0.2/contrib/unixdate/unixdate.sql:29: ERROR: Only users with Postgres superuser privilege are permitted to create a function in the 'internal' language. Others may use the 'sql' language or the created procedural languages.
psql:/usr/local/postgresql/7.0.2/contrib/unixdate/unixdate.sql:33: ERROR: Function 'reltime_timespan(int4)' does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
그리고 function을 만들고 나서 어떻게 사용하는 건지도 잘모르겠습니다.
조언 부탁드립니다.
|