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

Поиск
Список
Период
Сортировка
Искать

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

От:
David Garamond <lists@zara.6.isreserved.com>
Дата:
  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

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
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.

FAQ