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
95dacf85
Commit
95dacf85
authored
Nov 21, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put back accidentally-deleted quote_literal() regression tests.
parent
506070be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
src/test/regress/expected/text.out
src/test/regress/expected/text.out
+22
-1
src/test/regress/sql/text.sql
src/test/regress/sql/text.sql
+7
-1
No files found.
src/test/regress/expected/text.out
View file @
95dacf85
...
@@ -52,7 +52,7 @@ LINE 1: select 3 || 4.0;
...
@@ -52,7 +52,7 @@ LINE 1: select 3 || 4.0;
^
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
/*
/*
* string functions
*
various
string functions
*/
*/
select concat('one');
select concat('one');
concat
concat
...
@@ -118,6 +118,27 @@ select i, left('ahoj', i), right('ahoj', i) from generate_series(-5, 5) t(i) ord
...
@@ -118,6 +118,27 @@ select i, left('ahoj', i), right('ahoj', i) from generate_series(-5, 5) t(i) ord
5 | ahoj | ahoj
5 | ahoj | ahoj
(11 rows)
(11 rows)
select quote_literal('');
quote_literal
---------------
''
(1 row)
select quote_literal('abc''');
quote_literal
---------------
'abc'''
(1 row)
select quote_literal(e'\\');
quote_literal
---------------
E'\\'
(1 row)
/*
* format
*/
select format(NULL);
select format(NULL);
format
format
--------
--------
...
...
src/test/regress/sql/text.sql
View file @
95dacf85
...
@@ -30,7 +30,7 @@ select 'four: ' || 2+2;
...
@@ -30,7 +30,7 @@ select 'four: ' || 2+2;
select
3
||
4
.
0
;
select
3
||
4
.
0
;
/*
/*
* string functions
*
various
string functions
*/
*/
select
concat
(
'one'
);
select
concat
(
'one'
);
select
concat
(
1
,
2
,
3
,
'hello'
,
true
,
false
,
to_date
(
'20100309'
,
'YYYYMMDD'
));
select
concat
(
1
,
2
,
3
,
'hello'
,
true
,
false
,
to_date
(
'20100309'
,
'YYYYMMDD'
));
...
@@ -41,7 +41,13 @@ select concat_ws('',10,20,null,30);
...
@@ -41,7 +41,13 @@ select concat_ws('',10,20,null,30);
select
concat_ws
(
NULL
,
10
,
20
,
null
,
30
)
is
null
;
select
concat_ws
(
NULL
,
10
,
20
,
null
,
30
)
is
null
;
select
reverse
(
'abcde'
);
select
reverse
(
'abcde'
);
select
i
,
left
(
'ahoj'
,
i
),
right
(
'ahoj'
,
i
)
from
generate_series
(
-
5
,
5
)
t
(
i
)
order
by
i
;
select
i
,
left
(
'ahoj'
,
i
),
right
(
'ahoj'
,
i
)
from
generate_series
(
-
5
,
5
)
t
(
i
)
order
by
i
;
select
quote_literal
(
''
);
select
quote_literal
(
'abc
''
'
);
select
quote_literal
(
e
'
\\
'
);
/*
* format
*/
select
format
(
NULL
);
select
format
(
NULL
);
select
format
(
'Hello'
);
select
format
(
'Hello'
);
select
format
(
'Hello %s'
,
'World'
);
select
format
(
'Hello %s'
,
'World'
);
...
...
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