▲ | mdaniel 3 days ago | |
It's possible the following argument is what you meant by "from the SQL syntax," and if so apologies for the noise At least one demonstrable difference I can see between your recollection and this feature is that the column name being part of the DDL pushes the logic down into the DDL, versus every client having to carry that magic expression around with them. I think it's likely the age-old application-logic-client-side versus stored-proc camps
as compared to <<select id, silly from my_table>> for the consumer | ||
▲ | saltcured 3 days ago | parent [-] | |
The virtual column feature I remember is halfway in between. It is not part of the DDL nor reported table schema, so the developer needs to know about it. But if a function called silly with input type my_table existed, you could still do your second query. It has syntactic sugar for making a bare function name implicitly invoke on the current row record. I can't remember if that sugar could also be used in an expression index. I never really used this syntactic feature, as I thought being more explicit with function calls would be better coding style. |