Re: environment variables, output format & setting current

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: Brent Wood <baw(at)frc(dot)niwa(dot)cri(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: environment variables, output format & setting current
Date: 2002-02-22 17:22:20
Message-ID: 3C767E4C.8BC09A54@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try:

psql <db> -A -t -c "select current_date;"

> 2.If I do:
> psql <db> -c "select current_date;"
> I get:
>
> date
> ------------
> 2002-02-23
> (1 row)
>
> I can use:
> psql <db> -c "select current_date;" | tail -3 | head -1
> to just get the date value, but is there simpler way?
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message tony 2002-02-22 17:51:26 moving to 7.2
Previous Message Samuel J. Sutjiono 2002-02-22 17:04:38 Regular Expression for 'and' instead of 'or'