From: | "viksa verma" <vverma(at)installs(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | connecting to the database |
Date: | 2002-07-03 19:56:21 |
Message-ID: | afvktr$1tta$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I have some trouble making connection to the database.
This is what I use.
EXEC SQL CONNECT TO
tcp:postgresql://vikas.verma.com:5334/mydbname user vikasverma;
It works fine when I hard code the values like this.
But i want to use macros which i want to define in some other file and
include it.
Something like this
EXEC SQL CONNECT TO
tcp:postgresql://DB_IP:DB_PORT/DB_NAME user USER;
where DB_IP,DB_NAME,DB_PORT etc are macros defined in some file which i will
include.
Please help with this.
Question 2
If i have to define something in an include file lets say
myheader.h
EXEC SQL DEFINE NUM 20;
then do i have to include this as EXEC SQL INCLUDE myheader.h or #include
myheader.h.
Vikas.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-07-03 20:21:35 | Re: EVAL and SET equivalents in PostgreSQL |
Previous Message | Manfred Koizar | 2002-07-03 19:09:24 | Re: One source of constant annoyance identified |