Thread: per-session (or persistent) table (and column) aliases

per-session (or persistent) table (and column) aliases

From
David Garamond
Date:
  CREATE TABLE somereallylongname1 (...);
  CREATE TABLEALIAS name1 somereallylongname1;
  SELECT * FROM name1 ...;

Is there such a thing? I know there's alias in SELECT and completion in
psql (or even views). But this is more like a filesystem
symlink/hardlink. Would this be cool/useful?

--
dave


Re: per-session (or persistent) table (and column) aliases

From
Peter Eisentraut
Date:
David Garamond wrote:
>   CREATE TABLE somereallylongname1 (...);
>   CREATE TABLEALIAS name1 somereallylongname1;
>   SELECT * FROM name1 ...;
>
> Is there such a thing?

A view does exactly what you need.