Re: [GENERAL] Setting the table separator in psql command mode

Started by JohnDzalmost 28 years ago3 messagesgeneral
Jump to latest
#1JohnDz
john_dzilvelis@sunserv1.valpak.com

Mehrdad Ghassempoory wrote:

I am trying to set up the table separator (Default "|") to TAB
caharcter.

I have tried :

\f\t
\f \t
\f '\t'

Without any luck.
How is it done?

I found that the following works:

psql -F ' ' yourdatabasename

where a tab character is inserted in between the ' '

--
-----------------------------------------------------------------
|John Dzilvelis |
-----------------------------------------------------------------

#2Bruce Momjian
bruce@momjian.us
In reply to: JohnDz (#1)

Mehrdad Ghassempoory wrote:

I am trying to set up the table separator (Default "|") to TAB
caharcter.

I have tried :

\f\t
\f \t
\f '\t'

Without any luck.
How is it done?

I found that the following works:

psql -F ' ' yourdatabasename

where a tab character is inserted in between the ' '

6.4 will have this working as your originally expected.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)
#3Ricardo Romero
rromero@netfriendly.com
In reply to: Bruce Momjian (#2)
HELP

Somebody, HELP-ME PLEASE.

Tks, Romero

Using FreeBSD 2.2.5, postgreSQL 6.3.2

When i connect to PostgreSQL with pgsql ( user ) everything is fine.

But with root, no chances.

# who am i
root ttyp2 Jun 10 18:54 (:0.0)
# perl romero.pl
Can't load '/usr/local/lib/perl5/site_perl/i386-freebsd/auto/Pg/Pg.so' for
module Pg: Can't find shared library "libpq.so.1.1" at
/usr/local/lib/perl5/i386-freebsd/5.00404/DynaLoader.pm line 166.

at romero.pl line 3
BEGIN failed--compilation aborted at romero.pl line 3.
# cat romero.pl
#!/usr/local/bin/perl -w

use Pg;

$conn = Pg::connectdb("dbname=template1");
if(!$conn) {
print "Houve erro\n";
exit(1);
}

print "Vou fazer a query \n\n";
Pg::doQuery($conn, "select eu from eumesmo",\@ary);
print "Fiz a query \n\n";

#Pg::doQuery($conn, "select eu from eumesmo", \@ary);

#write;

for $j ( 0 .. $#ary ) {
print "Ai o que voce queria garotinho : $ary[$j][00]\n";
}

#$tot=$#ary+1;
$~ = 'PIEDE';
#write;

exit(0);
# psql template1
ld.so failed: Can't find shared library "libpq.so.1.1"
#