how to alias a table

Started by Ivan Sergio Borgonovoalmost 16 years ago3 messagesgeneral
Jump to latest
#1Ivan Sergio Borgonovo
mail@webthatworks.it

I'm refactoring some code and I'll find helpful to be able to alias
tables.

What I'd like to do would be to refer to the same table with an
alias in the code and later substitute the alias with an actual VIEW.

Of course I could define a view as
select * from original_table
right from the start but I'm worried this may incur in some overhead
I currently can't afford.

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

#2Tim Landscheidt
tim@tim-landscheidt.de
In reply to: Ivan Sergio Borgonovo (#1)
Re: how to alias a table

Ivan Sergio Borgonovo <mail@webthatworks.it> wrote:

I'm refactoring some code and I'll find helpful to be able to alias
tables.

What I'd like to do would be to refer to the same table with an
alias in the code and later substitute the alias with an actual VIEW.

Of course I could define a view as
select * from original_table
right from the start but I'm worried this may incur in some overhead
I currently can't afford.

Have you tried it?

Tim

#3fdd sds
kayee1995@yahoo.com
In reply to: Ivan Sergio Borgonovo (#1)
Re: how to alias a table

On Jun 13, 10:07 am, m...@webthatworks.it (Ivan Sergio Borgonovo)
wrote:

Show quoted text

I'm refactoring some code and I'll find helpful to be able to alias
tables.

What I'd like to do would be to refer to the same table with an
alias in the code and later substitute the alias with an actual VIEW.

Of course I could define a view as
select * from original_table
right from the start but I'm worried this may incur in some overhead
I currently can't afford.

thanks

--
Ivan Sergio Borgonovohttp://www.webthatworks.it

--
Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general