Reputation: 3915
In postgres you can return a row
as a single cell as in the following:
select row(date_created,created_By)
from some_table
However this does not work when you execute select row(*)
Does anybody know how to implement the row()
function using asterisk
so if my table changes in the future, I will not have to modify my query?
I am using Postgres version 8.4.1
Thank you.
Upvotes: 0
Views: 1005
Reputation: 49260
You just need to prefix the *
with the table-name or table-alias.
select row(s.*)
from some_table s
Upvotes: 3