Thread: psql missing feature
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)
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/
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> seeminglyinterested 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.
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.