Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make the language 'plpir' an alias for 'plparrot'
  • Loading branch information
leto committed May 21, 2010
1 parent 715aa8a commit cd79f29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plparrot.sql.in
Expand Up @@ -4,3 +4,6 @@ RETURNS language_handler AS 'MODULE_PATHNAME' LANGUAGE C;

-- language
CREATE LANGUAGE plparrot HANDLER plparrot_call_handler;

-- plpir is an alias for plparrot
CREATE LANGUAGE plpir HANDLER plparrot_call_handler;
9 changes: 8 additions & 1 deletion t/sql/test.sql
Expand Up @@ -15,7 +15,7 @@ BEGIN;
\i plparrot.sql

-- Plan the tests.
SELECT plan(25);
SELECT plan(26);

CREATE OR REPLACE FUNCTION create_plparrot()
RETURNS BOOLEAN
Expand All @@ -38,6 +38,11 @@ CREATE FUNCTION test_int_in(int) RETURNS int AS $$
.return(1)
$$ LANGUAGE plparrot;

CREATE FUNCTION test_plpir(int) RETURNS int LANGUAGE plpir AS $$
.param int x
.return(1)
$$;

CREATE FUNCTION test_immutable(int) RETURNS int AS $$
.param int x
.return(1)
Expand Down Expand Up @@ -180,6 +185,8 @@ select is(test_char_out('c'), 'b', 'We can return a char');
select is(test_int_in(42),1,'We can pass in an int');
select is(test_int_out(1),42,'We can return an int');

select is(test_plpir(1),1,'plpir is an alias for plparrot');

select is(test_immutable(42),1,'Immutable works');
select is(test_strict(NULL), NULL, 'Strict works');

Expand Down

0 comments on commit cd79f29

Please sign in to comment.