agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Eugene Yin <eugeneymail@ymail.com>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: public synonym
Date: Thu, 7 Jan 2016 20:17:40 +0000 (UTC)
Message-ID: <358282890.1765953.1452197860946.JavaMail.yahoo@mail.yahoo.com> (raw)
References: <358282890.1765953.1452197860946.JavaMail.yahoo.ref@mail.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
PostgreSQL ver 9.4.5. Linux OS.Application: Web Based
Platform: App Server (java) --> jdbc call --> Database Server (PostgreSQL)
I do know that PostgreSQL does 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_name from user_info_table
then access it from the Java (web app) side via the JDBC call to the database, will 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 in 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.
Thanks
Eugene
view thread (3+ messages) latest in thread
Message-ID: <358282890.1765953.1452197860946.JavaMail.yahoo@mail.yahoo.com>
Permalink: ../358282890.1765953.1452197860946.JavaMail.yahoo@mail.yahoo.com/
Also on: postgresql.org/message-id/358282890.1765953.1452197860946.JavaMail.yahoo@mail.yahoo.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: eugeneymail@ymail.com
Subject: Re: public synonym
In-Reply-To: <358282890.1765953.1452197860946.JavaMail.yahoo@mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox