psql missing feature

Started by Michal Maru¹kaalmost 25 years ago4 messages
#1Michal Maru¹ka
mmc@maruska.dyndns.org

What about (optionally) printing the type of the column data?

i.e:

io | tu | tipo | data
int | int | int2 | date
--------+-------+------+------------
102242 | 26404 | 1203 | 2000-11-22
(1 row)

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Michal Maru¹ka (#1)
Re: psql missing feature

Michal Maru�ka writes:

What about (optionally) printing the type of the column data?

io | tu | tipo | data
int | int | int2 | date
--------+-------+------+------------
102242 | 26404 | 1203 | 2000-11-22
(1 row)

I've been meaning to implement this for a while. Now that someone is
seemingly interested I might prioritize it.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#3Michal Maru¹ka
mmc@maruska.dyndns.org
In reply to: Peter Eisentraut (#2)
Re: psql missing feature

Peter Eisentraut writes:

Michal Maru�ka writes:

What about (optionally) printing the type of the column data?

io | tu | tipo | data
int | int | int2 | date
--------+-------+------+------------
102242 | 26404 | 1203 | 2000-11-22
(1 row)

I've been meaning to implement this for a while. Now that someone is
seemingly interested I might prioritize it.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Wait. As stated in my last message, I need _much_ more information. The "table of
origin" just to start.

IIRC the PGresult doesn't provide more info than the types, so the feature is
sensible at this level, but for my work it is too little. I want to know the tree/path made by
the data.

Maybe i am not clear enough, I must think about it, just wanted to note the
types will not help me that much.

#4Michal Maru¹ka
mmc@maruska.dyndns.org
In reply to: Michal Maru¹ka (#3)
Re: psql missing feature

Peter Eisentraut writes:

Michal Maru�ka writes:

What about (optionally) printing the type of the column data?

io | tu | tipo | data
int | int | int2 | date
--------+-------+------+------------
102242 | 26404 | 1203 | 2000-11-22
(1 row)

I've been meaning to implement this for a while. Now that someone is
seemingly interested I might prioritize it.

I have realized that the querytree is too much of information (imagine UNION queries).

So I think this feature (types of columns) is very good if accompanied with
tools to declare easily some/many clone types: eg int-> ID, int2 -> height .... as
the type is a nice invariant.