Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aHH49-0005Ja-0j for pgsql-sql@arkaria.postgresql.org; Thu, 07 Jan 2016 20:21:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aHH48-0006Tg-JR for pgsql-sql@arkaria.postgresql.org; Thu, 07 Jan 2016 20:21:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aHH38-00059g-H3 for pgsql-sql@postgresql.org; Thu, 07 Jan 2016 20:20:47 +0000 Received: from nm48.bullet.mail.ne1.yahoo.com ([98.138.120.55]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aHH34-0004y4-T4 for pgsql-sql@postgresql.org; Thu, 07 Jan 2016 20:20:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1452198040; bh=zdCWqojkc5vXi8b7xXNXnesQ8QgdTSxzFOXXNxWBgOE=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=PxSuvlWbT8JPAS0DXF63uQWMczHQN+zJVN/r57oLvBsxZumdx/gQxS4CNAs3/zPZcD67hSAMJYFRMXkGw6GNWaDg+16pbXszNcSjAmvGL54DSz+6Oc0vfwSn4SiE0zA5epFZHP3zpOeHq8KEwT5sJ2GV59nxcXpDenKkV8kWUvIhV+RQjehCXtKBBcj5Ieexaglhh8bJk/Kv6BsLigyT6EekwPg9IG5s0Wq9iR6dsi39dFmVwpMYOjvx4fhucFC13swyyeIfgaOO0FUbYwvwXdykqwX6dpSwZQgvl+bLPkZVFRZGWaLbKA5kLG+f7oZReO0PF0Ze/oJXdvLdfh7/zw== Received: from [127.0.0.1] by nm48.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jan 2016 20:20:40 -0000 Received: from [98.138.100.113] by nm48.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jan 2016 20:17:42 -0000 Received: from [66.196.81.170] by tm104.bullet.mail.ne1.yahoo.com with NNFMP; 07 Jan 2016 20:17:41 -0000 Received: from [98.139.212.212] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 07 Jan 2016 20:17:41 -0000 Received: from [127.0.0.1] by omp1021.mail.bf1.yahoo.com with NNFMP; 07 Jan 2016 20:17:41 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 643438.83562.bm@omp1021.mail.bf1.yahoo.com X-YMail-OSG: mX8UvtoVM1l3z9FFnt7aWqI20BPuDxG1VOLVqWVW30duJxkv6nrEa6LdPx_3pr5 b.rWswqkTxxsojHz_CD_V6QKqxCEH9eps6jVuZPDjrhll77F0RVXpWABVW7wi3S1wb.M.JHUMABD uKZjFP3WMsA7bZE2N5iRUiZx2aCPeMAiCP8ZOuq2e0EBzcWrTjeo1g75OFwpHyJThNz9uX_6zrC5 r1FBIKBmCHmKpRBR1VOjXDcm6v82HXvN6_KAjkISFJLws7xpr8JmjTIUKmhfaC9G5vJ1D40KVPP3 93bNbgvWZVym.AXf9bLH4XNwfxdVtvBBYqI2A.4_ZZq43amttJRtqQu.kysXOhL9YcNjOcU2C7PO qP0fAixYmIzseEzLaY4tK989XybO7UNTgrjPdF0hk0r6vz8NyD6GX1hcGxQmvMdtrO1hGIn860zr .SvGyUSeRHwEBimi4QDaGRXMj34TBfAsqoB39STp_0Wzhw3aOELgVTZoAF61bPq4YsuLcGotTtYJ eZApQw_CiYWWEKEIWieGdvKJ52qDDUzhJPm7repjd28lXa5NvFpMJymolrVlsWES5dAw0am4A4w-- Received: by 66.196.80.144; Thu, 07 Jan 2016 20:17:41 +0000 Date: Thu, 7 Jan 2016 20:17:40 +0000 (UTC) From: Eugene Yin Reply-To: Eugene Yin To: "pgsql-sql@postgresql.org" Message-ID: <358282890.1765953.1452197860946.JavaMail.yahoo@mail.yahoo.com> Subject: public synonym MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1765952_1974045863.1452197860940" References: <358282890.1765953.1452197860946.JavaMail.yahoo.ref@mail.yahoo.com> Content-Length: 11582 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org ------=_Part_1765952_1974045863.1452197860940 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable PostgreSQL ver 9.4.5. =C2=A0Linux OS.Application: =C2=A0Web Based Platform: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0App Server (java) --> jdbc call -->= Database Server (PostgreSQL) I do know that=C2=A0PostgreSQL=C2=A0does not support the public synonym.=C2= =A0=C2=A0Now, for a user schema (let's call it MASTER_USER), if I coded in = the stored function/procedure like the following,=C2=A0without using a publ= ic synonym to identify the=C2=A0table name:=C2=A0 select user_name from=C2=A0user_info_table then access it from the Java (web app) side=C2=A0via the JDBC call to the d= atabase, will that=C2=A0work?=C2=A0=C2=A0 OR,=C2=A0 I must use the identifier inside the sql, such as: =C2=A0select=C2=A0user_name=C2=A0from=C2=A0=C2=A0MASTER_USER.user_info_tabl= e? I come from the Oracle world, there I first create the public synonym for t= he table, then in the stored procedure I just directly reference the table = with no need to identify the table with a schema name. =C2=A0Like to know h= ow it work under the PostgreSQL. =C2=A0=C2=A0 Thanks Eugene ------=_Part_1765952_1974045863.1452197860940 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
PostgreSQ= L ver 9.4.5.  Linux OS.
Application:  Web Based=

Platform: &nb= sp;
   &n= bsp;App Server (java) --> jdbc call --> Database Server (PostgreSQL)<= /span>


I do know that PostgreSQL d= oes not support the public synonym.  Now, for a user schema (let's call it MASTER_USER)= , if I coded in the stored function/procedure like the following, without using a= public synonym to identify the table name: 

select user_n= ame from user_info_table

then access it from the Java (web app) side via the JDBC call to the database, wi= ll that work?  

OR, 

I must use the identifier inside the sql, such as:

=  select = user_name from  MASTER_USER.user_info_table?


I come from the = Oracle world, there I first create the public synonym for the table, then i= n the stored procedure I just directly reference the table with no need to = identify the table with a schema name.  Like to know how it work under= the PostgreSQL.

&nbs= p; 

Thanks

Eugene
------=_Part_1765952_1974045863.1452197860940--