I have this table that I would like to select values from. The thing is that I would like to get the exact amount of length in the output of my select as I have in my table.
For example:
CREATE TABLE myschema.test_table
(
id serial NOT NULL,
otyp CHARACTER VARYING(3),
fname CHARACTER VARYING(8),
age integer
) WITH(OIDS=FALSE);
And let’s say that this table contain
id | otyp | fname | age
----+------+--------+-----
1 | aa | gustav | 20
(1 row)
SELECT id || otyp || fname || age FROM myschema.test_table;
This would give me this result:
1aagustav20
I want the output to be
1aa gustav 20
Any help would appreciated!
I solved the problem!