postgresql/src/test/regress/expected/comments.out
Thomas G. Lockhart be703cd9e8 Implement nested block comments in the backend and in psql.
Include updates for the comment.sql regression test.
Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel.
Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT
 and SET AutoCommit in the parser only.
 Need to add code to actually do something.
Implement WITHOUT TIME ZONE type qualifier.
Define SCHEMA keyword, along with stubbed-out grammar.
Implement "[IN|INOUT|OUT] [varname] type" function arguments
 in parser only; INOUT and OUT throws an elog(ERROR).
Add PATH as a type-specific token, since PATH is in SQL99
 to support schema resource search and resolution.
2000-07-14 15:43:57 +00:00

66 lines
1.3 KiB
Plaintext

--
-- COMMENTS
--
SELECT 'trailing' AS first; -- trailing single line
first
----------
trailing
(1 row)
SELECT /* embedded single line */ 'embedded' AS second;
second
----------
embedded
(1 row)
SELECT /* both embedded and trailing single line */ 'both' AS third; -- trailing single line
third
-------
both
(1 row)
SELECT 'before multi-line' AS fourth;
fourth
-------------------
before multi-line
(1 row)
/* This is an example of SQL which should not execute:
* select 'multi-line';
*/
SELECT 'after multi-line' AS fifth;
fifth
------------------
after multi-line
(1 row)
--
-- Nested comments
--
/*
SELECT 'trailing' as x1; -- inside block comment
*/
/* This block comment surrounds a query which itself has a block comment...
SELECT /* embedded single line */ 'embedded' AS x2;
*/
SELECT -- continued after the following block comments...
/* Deeply nested comment.
This includes a single apostrophe to make sure we aren't decoding this part as a string.
SELECT 'deep nest' AS n1;
/* Second level of nesting...
SELECT 'deeper nest' as n2;
/* Third level of nesting...
SELECT 'deepest nest' as n3;
*/
Hoo boy. Still two deep...
*/
Now just one deep...
*/
'deeply nested example' AS sixth;
sixth
-----------------------
deeply nested example
(1 row)
/* and this is the end of the file */