Обсуждение: ECPG and remote databases

Поиск
Список
Период
Сортировка

ECPG and remote databases

От
nathan@khmere.com
Дата:
I have a question regarding remote databases.

I am programming in C and using  SQL and ecpg on FreeBSD 3.2 with
postgres 6.5.2 / ecpg 2.6.0.

I  want to connect to a remote database as a  specific user. So the man
page for ecpg says to do the following

EXEC SQL CONNECT   dbname[@server][:port]
      or
<tcp|unix>:postgresql://server[:port][/dbname][?options]

But either way does not work, can someone please let me know the proper
syntax  fo ecpg or how to do this within embedded SQL ?

thank you

nathan




Re: [INTERFACES] ECPG and remote databases

От
Michael Meskes
Дата:
On Wed, Jan 05, 2000 at 09:26:12AM -0800, nathan@khmere.com wrote:
> I  want to connect to a remote database as a  specific user. So the man
> page for ecpg says to do the following
> 
> EXEC SQL CONNECT   dbname[@server][:port]

exec sql connect TO <connection target>.

> But either way does not work, can someone please let me know the proper
> syntax  fo ecpg or how to do this within embedded SQL ?

I'm sorry, the man page you have is way outdated. But right now it's
difficult for me to just find the time to fix bugs.

You may look into the test files in the source tree.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!