pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed(no subject)
5+ messages / 5 participants
[nested] [flat]
* (no subject)
@ 2005-04-19 20:27 Zuoxin.Wang@kp.org
2005-04-19 20:46 ` Re: Alvaro Herrera <alvherre@dcc.uchile.cl>
2005-04-19 20:48 ` Re: Scott Marlowe <smarlowe@g2switchworks.com>
2005-04-19 21:01 ` Re: Michael Fuhr <mike@fuhr.org>
0 siblings, 3 replies; 5+ messages in thread
From: Zuoxin.Wang@kp.org @ 2005-04-19 20:27 UTC (permalink / raw)
To: pgsql-admin
Hi all,
Does any one know why I have following inconsistant results from
PostgreSQL?
Thanks in advance.
test=# select birthday from patient;
birthday
------------
1960-02-01
1960-02-01
(2 rows)
test=# select used from patient;
used
------
N
N
(2 rows)
test=# select first_name, last_name, used, birthday from patient;
first_name | last_name | used | birthday
------------+-----------+------+------------
| 1960-02-01DI | N
| 1960-02-01DI | N
(2 rows)
test=# select first_name, last_name, birthday, used from patient;
first_name | last_name | birthday | used
------------+-----------+------------+------
AAAAAA | TDI | 1960-02-01 | N
AAAAAB | TDI | 1960-02-01 | N
(2 rows)
test=#
Jason
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
2005-04-19 20:27 (no subject) Zuoxin.Wang@kp.org
@ 2005-04-19 20:46 ` Alvaro Herrera <alvherre@dcc.uchile.cl>
2005-04-19 21:08 ` Re: Steve Crawford <scrawford@pinpointresearch.com>
2 siblings, 1 reply; 5+ messages in thread
From: Alvaro Herrera @ 2005-04-19 20:46 UTC (permalink / raw)
To: Zuoxin.Wang@kp.org; +Cc: pgsql-admin
On Tue, Apr 19, 2005 at 01:27:09PM -0700, Zuoxin.Wang@kp.org wrote:
> test=# select used from patient;
> used
> ------
> N
> N
> (2 rows)
Try
select '{' || used || '}' from patient;
> test=# select first_name, last_name, used, birthday from patient;
> first_name | last_name | used | birthday
> ------------+-----------+------+------------
> | 1960-02-01DI | N
> | 1960-02-01DI | N
> (2 rows)
Looks like you have some non-printable character in the used column.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"La conclusión que podemos sacar de esos estudios es que
no podemos sacar ninguna conclusión de ellos" (Tanenbaum)
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
2005-04-19 20:27 (no subject) Zuoxin.Wang@kp.org
2005-04-19 20:46 ` Re: Alvaro Herrera <alvherre@dcc.uchile.cl>
@ 2005-04-19 21:08 ` Steve Crawford <scrawford@pinpointresearch.com>
0 siblings, 0 replies; 5+ messages in thread
From: Steve Crawford @ 2005-04-19 21:08 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@dcc.uchile.cl>; Zuoxin.Wang@kp.org; +Cc: pgsql-admin
On Tuesday 19 April 2005 1:46 pm, Alvaro Herrera wrote:
> Looks like you have some non-printable character in the used
> column.
I concur. Alternately you can (assuming you're running *nix which
probably has xxd and more) try this to see exactly what is in the
data:
psql -c "select * from patient" | xxd | more
Cheers,
Steve
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
2005-04-19 20:27 (no subject) Zuoxin.Wang@kp.org
@ 2005-04-19 20:48 ` Scott Marlowe <smarlowe@g2switchworks.com>
2 siblings, 0 replies; 5+ messages in thread
From: Scott Marlowe @ 2005-04-19 20:48 UTC (permalink / raw)
To: Zuoxin.Wang@kp.org; +Cc: pgsql-admin
It looks like you have some non-printing characters (like ansi
positioning characters or something) in your data.
On Tue, 2005-04-19 at 15:27, Zuoxin.Wang@kp.org wrote:
> Hi all,
> Does any one know why I have following inconsistant results from
> PostgreSQL?
> Thanks in advance.
>
> test=# select birthday from patient;
> birthday
> ------------
> 1960-02-01
> 1960-02-01
> (2 rows)
>
> test=# select used from patient;
> used
> ------
> N
> N
> (2 rows)
>
>
> test=# select first_name, last_name, used, birthday from patient;
> first_name | last_name | used | birthday
> ------------+-----------+------+------------
> | 1960-02-01DI | N
> | 1960-02-01DI | N
> (2 rows)
>
> test=# select first_name, last_name, birthday, used from patient;
> first_name | last_name | birthday | used
> ------------+-----------+------------+------
> AAAAAA | TDI | 1960-02-01 | N
> AAAAAB | TDI | 1960-02-01 | N
> (2 rows)
>
> test=#
>
> Jason
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re:
2005-04-19 20:27 (no subject) Zuoxin.Wang@kp.org
@ 2005-04-19 21:01 ` Michael Fuhr <mike@fuhr.org>
2 siblings, 0 replies; 5+ messages in thread
From: Michael Fuhr @ 2005-04-19 21:01 UTC (permalink / raw)
To: Zuoxin.Wang@kp.org; +Cc: pgsql-admin
On Tue, Apr 19, 2005 at 01:27:09PM -0700, Zuoxin.Wang@kp.org wrote:
>
> test=# select first_name, last_name, used, birthday from patient;
> first_name | last_name | used | birthday
> ------------+-----------+------+------------
> | 1960-02-01DI | N
> | 1960-02-01DI | N
> (2 rows)
I'd guess that the "used" columns contain carriage returns. What
do you see if you run the following query?
SELECT replace(used, '\r', '\\r'), length(used) FROM patient;
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-04-19 21:08 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-19 20:27 Zuoxin.Wang@kp.org
2005-04-19 20:46 ` Re: Alvaro Herrera <alvherre@dcc.uchile.cl>
2005-04-19 21:08 ` Re: Steve Crawford <scrawford@pinpointresearch.com>
2005-04-19 20:48 ` Re: Scott Marlowe <smarlowe@g2switchworks.com>
2005-04-19 21:01 ` Re: Michael Fuhr <mike@fuhr.org>
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