Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
08dc2af9
Commit
08dc2af9
authored
Sep 14, 2005
by
Neil Conway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak the PL/PgSQL regression tests to catch the recently reported bug
in parsing cursor declarations.
parent
323f0a6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/test/regress/expected/plpgsql.out
src/test/regress/expected/plpgsql.out
+5
-5
src/test/regress/sql/plpgsql.sql
src/test/regress/sql/plpgsql.sql
+5
-5
No files found.
src/test/regress/expected/plpgsql.out
View file @
08dc2af9
...
...
@@ -2268,12 +2268,12 @@ commit;
-- should fail
fetch next from test1;
ERROR: cursor "test1" does not exist
create function refcursor_test2(int) returns boolean as $$
create function refcursor_test2(int
, int
) returns boolean as $$
declare
c1 cursor (param
integer) for select * from rc_test where a > param
;
c1 cursor (param
1 int, param2 int) for select * from rc_test where a > param1 and b > param2
;
nonsense record;
begin
open c1($1);
open c1($1
, $2
);
fetch c1 into nonsense;
close c1;
if found then
...
...
@@ -2283,8 +2283,8 @@ begin
end if;
end
$$ language 'plpgsql';
select refcursor_test2(20000) as "Should be false",
refcursor_test2(20) as "Should be true";
select refcursor_test2(20000
, 20000
) as "Should be false",
refcursor_test2(20
, 20
) as "Should be true";
Should be false | Should be true
-----------------+----------------
f | t
...
...
src/test/regress/sql/plpgsql.sql
View file @
08dc2af9
...
...
@@ -1926,12 +1926,12 @@ commit;
-- should fail
fetch
next
from
test1
;
create
function
refcursor_test2
(
int
)
returns
boolean
as
$$
create
function
refcursor_test2
(
int
,
int
)
returns
boolean
as
$$
declare
c1
cursor
(
param
integer
)
for
select
*
from
rc_test
where
a
>
param
;
c1
cursor
(
param
1
int
,
param2
int
)
for
select
*
from
rc_test
where
a
>
param1
and
b
>
param2
;
nonsense
record
;
begin
open
c1
(
$
1
);
open
c1
(
$
1
,
$
2
);
fetch
c1
into
nonsense
;
close
c1
;
if
found
then
...
...
@@ -1942,8 +1942,8 @@ begin
end
$$
language
'plpgsql'
;
select
refcursor_test2
(
20000
)
as
"Should be false"
,
refcursor_test2
(
20
)
as
"Should be true"
;
select
refcursor_test2
(
20000
,
20000
)
as
"Should be false"
,
refcursor_test2
(
20
,
20
)
as
"Should be true"
;
--
-- tests for "raise" processing
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment