Does this look strange to anyone:

test=> create table kk1 (born date);
CREATE
test=> select * from kk1;
born
----
(0 rows)

test=> insert into kk1 values ('1/1/1990');
INSERT 18588 1
test=> select * from kk1;
      born
----------
01-01-1990
(1 row)

Look how 'born' is right-shifted in the column.  Any idea why?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 19 Oct 1999 00:13:31 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
funny psql output
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> test=> insert into kk1 values ('1/1/1990');
> INSERT 18588 1
> test=> select * from kk1;
>       born
> ----------
> 01-01-1990
> (1 row)

> Look how 'born' is right-shifted in the column.  Any idea why?

I think libpq's print routine is deciding that the column is numeric.
(all digits and minus signs ... and IIRC it's not very picky about
where the minus signs are...)

Perhaps Peter will fix this during his massive rewrite.

			regards, tom lane

Tue, 19 Oct 1999 01:05:00 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] funny psql output 
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > test=> insert into kk1 values ('1/1/1990');
> > INSERT 18588 1
> > test=> select * from kk1;
> >       born
> > ----------
> > 01-01-1990
> > (1 row)
> 
> > Look how 'born' is right-shifted in the column.  Any idea why?
> 
> I think libpq's print routine is deciding that the column is numeric.
> (all digits and minus signs ... and IIRC it's not very picky about
> where the minus signs are...)
> 
> Perhaps Peter will fix this during his massive rewrite.

Oh, that's fine.  I just never realized it did that, but I see it now in
all my numeric columns.  Interesting.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 19 Oct 1999 05:00:19 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] funny psql output