I have a question about whether this can be done in postgresql
Let's say I have a table called X which has 3 fields, a, b, c
If I do a select * from X it gives me the records in the form:
a --- b --- c
---------
Okay, so I would like some way to get the name of the table out as the name of the field too, that is to say something like this:
X.a ---- X.b ----- X.c
--------------------
Because what I do is create an excel from several tables with many fields each, and doing it as I do, I put it directly in excel with their fields, but of course, I need to differentiate which tables they belong to.
And do in each field "as X_a" ... is unfeasible with hundreds of fields in each table