Skip site navigation (1) Skip section navigation (2)

commenting sql code

From: joseph speigle <joe(dot)speigle(at)jklh(dot)us>
To: pgsql-novice(at)postgresql(dot)org
Subject: commenting sql code
Date: 2004-02-20 01:13:49
Message-ID: 20040220011349.GA4831@www.sirfsup.com (view raw or flat)
Thread:
Lists: pgsql-novice
hi,
I was wondering again (I'd asked this a while back but can't find in archives) ..... how can I make an sql comment?

For example this script .....
*******************************************************
select mazurek(1);
-- test
SELECT  count(*) as master_count FROM master;
SELECT  count(*) as detail_count FROM detail;
*******************************************************

gives me this result:
*******************************************************
test=# \e mazurek_test.sql
                 mazurek
------------------------------------------
 less references in master than in detail
(1 row)

test=#
*******************************************************
which is the return value from the function, and all further output is killed by the comment.

so it produces no output after the --test.

WASN'T THAT A COMMENT?  

I have also tried.... --test (without the space)
to no avail

joe 
-- 
speigle
www.sirfsup.com

Responses

pgsql-novice by date

Next:From: joseph speigleDate: 2004-02-20 01:17:24
Subject: outputting commands to spool
Previous:From: kynnDate: 2004-02-20 00:23:29
Subject: psql hangs after "drop table ..."

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group