use of alias - Mailing list pgsql-hackers

From Amit jain
Subject use of alias
Date
Msg-id daf917830802112119i4d8b8da7rfd65166dc4eca4ab@mail.gmail.com
Whole thread Raw
Responses Re: use of alias  (Brett McBride <brett@deakin.edu.au>)
List pgsql-hackers
Hello Everybody,<br /><br />I am trying to change a oracle function to postgreSQL. I have to use the function parameter
indifferent query so i need to use alias command.<br />but i am not able to use this alias in "from  clause" of select
statment.could anybody please let me know how can i use it in from clause.i am getting following error while executing
thefunciton..<br /><br />MT ALIAS FOR  $1;<br />ST ALIAS FOR  $2;<br /><br />select  count(*) into count1 from MT,ST
whereMT.phonenumber=ST.phonenumber;<br /><br /><b>ERROR:  syntax error at or near "$1"<br />LINE 1: select count(*)
from $1 , $2  where MT.phonenumber=ST.phone...<br /><br />Thanx in Advance for all of your suggestion....</b><br /><br
/>

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: -U option in psql
Next
From: Brett McBride
Date:
Subject: Re: use of alias