BUG #1341: problem when showing resulted in the screen

Started by PostgreSQL Bugs Listover 21 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

The following bug has been logged online:

Bug reference: 1341
Logged by: Pablo Borges

Email address: pablodev@hotmail.com

PostgreSQL version: 7.4.6

Operating system: Linux Slackware

Description: problem when showing resulted in the screen

Details:

select * from teleoperador;
id | login | ip | tipo
----+----------+------------------------+------
0 | pablo | 10.0.0.106 | C
1 | builder | 10.0.0.107
10.0.0.107 | C
2 | reinaldo | 10.0.0.105 | C
(3 rows)

\d teleoperador
Table "public.teleoperador"
Column | Type | Modifiers
--------+-------------------+----------------------------------------------
----------------
id | integer | not null default
nextval('public.teleoperador_id_seq'::text)
login | character varying |
ip | character varying | not null
tipo | character(1) | not null
Indexes:
"teleoperador_pkey" primary key, btree (id)
"teleoperador_login_key" unique, btree (login)

is one bug?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: BUG #1341: problem when showing resulted in the screen

"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:

select * from teleoperador;
id | login | ip | tipo
----+----------+------------------------+------
0 | pablo | 10.0.0.106 | C
1 | builder | 10.0.0.107
10.0.0.107 | C
2 | reinaldo | 10.0.0.105 | C
(3 rows)

Looks to me like you managed to store a carriage return or newline
character (\r or \n) in the ip column.

Is there a reason for using varchar rather than the inet datatype
for that column? inet would give you some error checking, which
you evidently need.

regards, tom lane