Skip to content

Commit

Permalink
fix regress tests for 9.1 and older - wrong using 9.2 feature in comm…
Browse files Browse the repository at this point in the history
…on code
  • Loading branch information
okbob committed Jan 1, 2015
1 parent d25b5b8 commit 3edf286
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions datefce.c
Expand Up @@ -652,7 +652,7 @@ ora_timestamptz_trunc(PG_FUNCTION_ARGS)
fsec_t fsec;
struct pg_tm tt, *tm = &tt;

#if PG_VERSION_NUM >= 90100
#if PG_VERSION_NUM >= 90200
const char *tzn;
#else
char *tzn;
Expand Down Expand Up @@ -759,7 +759,7 @@ ora_timestamptz_round(PG_FUNCTION_ARGS)
fsec_t fsec;
struct pg_tm tt, *tm = &tt;

#if PG_VERSION_NUM >= 90100
#if PG_VERSION_NUM >= 90200
const char *tzn;
#else
char *tzn;
Expand Down
20 changes: 10 additions & 10 deletions expected/init.out
Expand Up @@ -2,14 +2,14 @@
psql:orafce.sql:1956: NOTICE: type "varchar2" is not yet defined
DETAIL: Creating a shell type definition.
psql:orafce.sql:1963: NOTICE: argument type varchar2 is only a shell
psql:orafce.sql:1977: NOTICE: return type varchar2 is only a shell
psql:orafce.sql:1984: NOTICE: argument type varchar2 is only a shell
psql:orafce.sql:2005: NOTICE: argument type varchar2 is only a shell
psql:orafce.sql:2005: NOTICE: return type varchar2 is only a shell
psql:orafce.sql:2158: NOTICE: type "nvarchar2" is not yet defined
psql:orafce.sql:1970: NOTICE: return type varchar2 is only a shell
psql:orafce.sql:1977: NOTICE: argument type varchar2 is only a shell
psql:orafce.sql:1998: NOTICE: argument type varchar2 is only a shell
psql:orafce.sql:1998: NOTICE: return type varchar2 is only a shell
psql:orafce.sql:2147: NOTICE: type "nvarchar2" is not yet defined
DETAIL: Creating a shell type definition.
psql:orafce.sql:2165: NOTICE: argument type nvarchar2 is only a shell
psql:orafce.sql:2179: NOTICE: return type nvarchar2 is only a shell
psql:orafce.sql:2186: NOTICE: argument type nvarchar2 is only a shell
psql:orafce.sql:2207: NOTICE: argument type nvarchar2 is only a shell
psql:orafce.sql:2207: NOTICE: return type nvarchar2 is only a shell
psql:orafce.sql:2154: NOTICE: argument type nvarchar2 is only a shell
psql:orafce.sql:2161: NOTICE: return type nvarchar2 is only a shell
psql:orafce.sql:2168: NOTICE: argument type nvarchar2 is only a shell
psql:orafce.sql:2189: NOTICE: argument type nvarchar2 is only a shell
psql:orafce.sql:2189: NOTICE: return type nvarchar2 is only a shell
22 changes: 22 additions & 0 deletions orafce-common-2.sql
Expand Up @@ -79,4 +79,26 @@ CREATE AGGREGATE pg_catalog.median(double precision) (
FINALFUNC=pg_catalog.median8_finalfn
);

CREATE FUNCTION nvarchar2_transform(internal)
RETURNS internal
AS 'varchar_transform'
LANGUAGE internal
STRICT
IMMUTABLE;

UPDATE pg_proc
SET protransform=(SELECT oid FROM pg_proc WHERE proname='varchar2_transform')
WHERE proname='nvarchar2';

CREATE FUNCTION varchar2_transform(internal)
RETURNS internal
AS 'varchar_transform'
LANGUAGE internal
STRICT
IMMUTABLE;

UPDATE pg_proc
SET protransform=(SELECT oid FROM pg_proc WHERE proname='varchar2_transform')
WHERE proname='varchar2';

COMMIT;
22 changes: 0 additions & 22 deletions orafce-common.sql
Expand Up @@ -1962,13 +1962,6 @@ LANGUAGE C
STRICT
IMMUTABLE;

CREATE FUNCTION varchar2_transform(internal)
RETURNS internal
AS 'varchar_transform'
LANGUAGE internal
STRICT
IMMUTABLE;

CREATE FUNCTION varchar2recv(internal,oid,integer)
RETURNS varchar2
AS 'MODULE_PATHNAME','varchar2recv'
Expand Down Expand Up @@ -2117,10 +2110,6 @@ CREATE CAST (interval AS varchar2)
WITH INOUT
AS IMPLICIT;

UPDATE pg_proc
SET protransform=(SELECT oid FROM pg_proc WHERE proname='varchar2_transform')
WHERE proname='varchar2';

-- string functions for varchar2 type
-- these are 'byte' versions of corresponsing text/varchar functions

Expand Down Expand Up @@ -2164,13 +2153,6 @@ LANGUAGE C
STRICT
IMMUTABLE;

CREATE FUNCTION nvarchar2_transform(internal)
RETURNS internal
AS 'varchar_transform'
LANGUAGE internal
STRICT
IMMUTABLE;

CREATE FUNCTION nvarchar2recv(internal,oid,integer)
RETURNS nvarchar2
AS 'MODULE_PATHNAME','nvarchar2recv'
Expand Down Expand Up @@ -2319,10 +2301,6 @@ CREATE CAST (interval AS nvarchar2)
WITH INOUT
AS IMPLICIT;

UPDATE pg_proc
SET protransform=(SELECT oid FROM pg_proc WHERE proname='varchar2_transform')
WHERE proname='nvarchar2';

GRANT USAGE ON SCHEMA dbms_pipe TO PUBLIC;
GRANT USAGE ON SCHEMA dbms_alert TO PUBLIC;
GRANT USAGE ON SCHEMA plvdate TO PUBLIC;
Expand Down

0 comments on commit 3edf286

Please sign in to comment.