pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Print line?
3+ messages / 3 participants
[nested] [flat]

* Print line?
@ 2002-10-22 17:46  Markus Dehmann <markus.cl@gmx.de>
  0 siblings, 2 replies; 3+ messages in thread

From: markus.cl@gmx.de @ 2002-10-22 17:46 UTC (permalink / raw)
  To: pgsql-admin

Hi,

is there an SQL command that just prints a line? I want to do sth like:

-- SQL query
print "Now displaying cities...";
SELECT * from cities;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Print line?
@ 2002-10-23 13:38  Ian Barwick <barwick@gmx.net>
  parent: Markus Dehmann <markus.cl@gmx.de>
  1 sibling, 0 replies; 3+ messages in thread

From: Ian Barwick @ 2002-10-23 13:38 UTC (permalink / raw)
  To: markus.cl@gmx.de; pgsql-admin

On Tuesday 22 October 2002 19:46, Markus Dehmann wrote:
> Hi,
>
> is there an SQL command that just prints a line? I want to do sth like:
>
> -- SQL query
> print "Now displaying cities...";
> SELECT * from cities;

By definition SQL doesn't have any output formatting
functions; those are provided by individual client
applications.

In psql you can use \echo to print a line to standard
output. \? shows other available options.

Ian Barwick
barwick@gmx.net





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Print line?
@ 2002-10-23 18:08  Jeff Boes <jboes@nexcerpt.com>
  parent: Markus Dehmann <markus.cl@gmx.de>
  1 sibling, 0 replies; 3+ messages in thread

From: Jeff Boes @ 2002-10-23 18:08 UTC (permalink / raw)
  To: pgsql-admin

On Tue, 22 Oct 2002 13:46:37 -0400, Markus Dehmann wrote:

> Hi,
> 
> is there an SQL command that just prints a line? I want to do sth like:
> 
> -- SQL query
> print "Now displaying cities...";
> SELECT * from cities;

Try \qecho:


\qecho Now displaying cities
SELECT * FROM cities;

Otherwise you could also do:

\t
SELECT 'Now displaying cities...';
\t
SELECT * FROM cities;
 

-- 
Jeff Boes                                      vox 616.226.9550 ext 24
Database Engineer                                     fax 616.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
           ...Nexcerpt... Extend your Expertise



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-10-23 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22 17:46 Print line? Markus Dehmann <markus.cl@gmx.de>
2002-10-23 13:38 ` Ian Barwick <barwick@gmx.net>
2002-10-23 18:08 ` Jeff Boes <jboes@nexcerpt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox