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

Started by David Garamondalmost 22 years ago2 messagesgeneral
Jump to latest
#1David 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

#2Peter Eisentraut
peter_e@gmx.net
In reply to: David Garamond (#1)
Re: per-session (or persistent) table (and column) aliases

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.