]> granicus.if.org Git - postgresql/blob - src/test/regress/sql/comments.sql
RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
[postgresql] / src / test / regress / sql / comments.sql
1 --
2 -- COMMENTS
3 --
4
5 SELECT 'trailing' AS first; -- trailing single line
6 SELECT /* embedded single line */ 'embedded' AS second;
7 SELECT /* both embedded and trailing single line */ 'both' AS third; -- trailing single line
8
9 SELECT 'before multi-line' AS fourth;
10 /* This is an example of SQL which should not execute:
11  * select 'multi-line';
12  */
13 SELECT 'after multi-line' AS fifth;
14
15 --
16 -- Nested comments
17 --
18
19 /*
20 SELECT 'trailing' as x1; -- inside block comment
21 */
22
23 /* This block comment surrounds a query which itself has a block comment...
24 SELECT /* embedded single line */ 'embedded' AS x2;
25 */
26
27 SELECT -- continued after the following block comments...
28 /* Deeply nested comment.
29    This includes a single apostrophe to make sure we aren't decoding this part as a string.
30 SELECT 'deep nest' AS n1;
31 /* Second level of nesting...
32 SELECT 'deeper nest' as n2;
33 /* Third level of nesting...
34 SELECT 'deepest nest' as n3;
35 */
36 Hoo boy. Still two deep...
37 */
38 Now just one deep...
39 */
40 'deeply nested example' AS sixth;
41
42 /* and this is the end of the file */