Re: [GENERAL] Connection string

2006-08-19 Thread Michael Fuhr
On Sat, Aug 19, 2006 at 03:36:42PM +0200, Michael Meskes wrote: > On Fri, Aug 18, 2006 at 02:54:19PM -0600, Michael Fuhr wrote: > > It works with a double-quoted string but not with a single-quoted > > string as the documentation mentions. > > It's not supposed to work with single-quoted strings.

Re: [GENERAL] Connection string

2006-08-19 Thread Michael Meskes
On Fri, Aug 18, 2006 at 02:54:19PM -0600, Michael Fuhr wrote: > It works with a double-quoted string but not with a single-quoted > string as the documentation mentions. It's not supposed to work with single-quoted strings. This is a documentation bug. Or does anyone think we should support single

Re: [GENERAL] Connection string

2006-08-18 Thread Michael Fuhr
On Fri, Aug 18, 2006 at 06:01:02PM +0200, Michael Meskes wrote: > On Tue, Aug 15, 2006 at 07:31:31PM -0600, Michael Fuhr wrote: > > Will that be a minor fix that can be backpatched or will it be > > invasive enough to be fixed only in HEAD? I'll submit a documentation > > I just fixed it and appl

Re: [GENERAL] Connection string

2006-08-18 Thread Michael Meskes
On Tue, Aug 15, 2006 at 07:31:31PM -0600, Michael Fuhr wrote: > Will that be a minor fix that can be backpatched or will it be > invasive enough to be fixed only in HEAD? I'll submit a documentation I just fixed it and applied the patch to 8.0 and 8.1 too. Please test it. 7.4 is way more differe

Re: [GENERAL] Connection string

2006-08-15 Thread Michael Fuhr
On Tue, Aug 15, 2006 at 03:56:03PM +0200, Michael Meskes wrote: > On Tue, Aug 15, 2006 at 05:59:23AM -0600, Michael Fuhr wrote: > > I'll submit a patch. However, in the case of string literals not > > working, is that a documentation bug or a code bug? Are they > > supposed to work? > > You shou

Re: [GENERAL] Connection string

2006-08-15 Thread Harpreet Dhaliwal
Its doneservice iptables stop did the trickfirewall was running on my DB serverforgot to stop itThanks~HarpreetOn 8/15/06, Michael Fuhr <[EMAIL PROTECTED]> wrote:On Sun, Aug 13, 2006 at 10:30:24AM +0200, Michael Meskes wrote: > On Fri, Aug 11, 2006 at 04:40:36PM -0600, Michael Fuhr wrote:> > Will

Re: [GENERAL] Connection string

2006-08-15 Thread Harpreet Dhaliwal
in my previous mail both the ip addressed should be read as 192.168.0.123thanksharpreetOn 8/15/06, Harpreet Dhaliwal < [EMAIL PROTECTED]> wrote:Hi Micheal,sudde2nly a problem has cropped up in my connection. Its kind of strange.ECPGdegug(1, stderr) says[9852]: connect: cold not open database db

Re: [GENERAL] Connection string

2006-08-15 Thread Harpreet Dhaliwal
Hi Micheal,sudde2nly a problem has cropped up in my connection.Its kind of strange.ECPGdegug(1, stderr) says[9852]: connect: cold not open database dbxyz on 192.168.0.123 port 5432 for user jsb in line 16 could not connect to server: No route to host Is the server running on host "192.168.

Re: [GENERAL] Connection string

2006-08-15 Thread Michael Meskes
On Tue, Aug 15, 2006 at 05:59:23AM -0600, Michael Fuhr wrote: > I'll submit a patch. However, in the case of string literals not > working, is that a documentation bug or a code bug? Are they > supposed to work? You shoudl be able to use a string constant or a char * variable as database name. T

Re: [GENERAL] Connection string

2006-08-15 Thread Michael Fuhr
On Sun, Aug 13, 2006 at 10:30:24AM +0200, Michael Meskes wrote: > On Fri, Aug 11, 2006 at 04:40:36PM -0600, Michael Fuhr wrote: > > Will you take care of it or should I submit a patch? I've noticed > > I you have the time to write the patch I woul dappreciate it. I'll submit a patch. However, i

Re: [GENERAL] Connection string

2006-08-14 Thread Michael Meskes
On Fri, Aug 11, 2006 at 04:40:36PM -0600, Michael Fuhr wrote: > > > EXEC SQL CONNECT TO 'unix:postgresql://sql.mydomain.com/mydb' AS > > > myconnection USER john; > > > > > > Should that be changed? It's wrong on two counts as far as > > > > I think so yes. > > Will you take care of it or sho

Re: [GENERAL] Connection string

2006-08-14 Thread Michael Meskes
On Sun, Aug 13, 2006 at 01:50:13AM -0400, Harpreet Dhaliwal wrote: > I'm really not able to connect to my database server. > ... Again, your example works nicely for me. This has to be a problem with your local setup. You should get the same connection problem using psql on the same machine with t

Re: [GENERAL] Connection string

2006-08-13 Thread Richard Broersma Jr
oops, for got the link: http://www.pgadmin.org/download/ --- Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > > Hi Richard, > > I'm attaching pg_hba.conf and postgresql.conf files as you had asked for. > > Don't know if I've missed anything in these two configuration files that > > would not let

Re: [GENERAL] Connection string

2006-08-13 Thread Richard Broersma Jr
> Hi Richard, > I'm attaching pg_hba.conf and postgresql.conf files as you had asked for. > Don't know if I've missed anything in these two configuration files that > would not let > my client machine to connect to the DB computer. > > Also, what exactly do u want me to install on the client compu

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Yeah. I just realized when I could not start pgadminIII in the DB server computer.Added that line for localhost too :)Yeah, i need stronger authentication for my application. Thanks for the valuable advice. Thanks again~Harpreet.On 8/13/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Sun, Aug 13, 20

Re: [GENERAL] Connection string

2006-08-13 Thread Michael Fuhr
On Sun, Aug 13, 2006 at 07:07:11PM -0400, Harpreet Dhaliwal wrote: > Problem was with pg_hba.conf file > > ECPGdebug(1, stderr); showed that in pg_hba.conf there was setting for > localhost only and not for other ip addresses. > > I had to change the configuration for IPV4 local connections > >

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Thanks alot all.You guys have been really helpful.I've crossed the first obstacle, a major one though...Phew.Let me see where do I trip later :-)~HarpreetOn 8/13/06, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > Postgres is not installed in the client computer.> When i try to connect to the pos

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Michael,Please ignore my last emailAt last I got error code 0.Problem was with pg_hba.conf fileECPGdebug(1, stderr); showed that in pg_hba.conf there was setting for localhost only and not for other ip addresses. I had to change the configuration for IPV4 local connectionsIt should have been someth

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
ECPGdebug(1, stderr);After including this line of code in my program, it says:raising sqlcode -402 in line 14, 'could not connect to database dbxyz in line 14'Thanks,~Harpreet. On 8/13/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Sun, Aug 13, 2006 at 01:58:54AM -0400, Harpreet Dhaliwal wrote:> -4

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Hi Richard,I'm attaching pg_hba.conf and postgresql.conf files as you had asked for.Don't know if I've missed anything in these two configuration files that would not let my client machine to connect to the DB computer. Also, what exactly do u want me to install on the client computer? A full fledg

Re: [GENERAL] Connection string

2006-08-13 Thread Richard Broersma Jr
> Postgres is not installed in the client computer. > When i try to connect to the postgres db from the computer in which postgres > is installed, it goes through. No hassles in that. > Problem comes up when I'm trying to connect to the same database from a > different computer in which no postgres

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
Postgres is not installed in the client computer. When i try to connect to the postgres db from the computer in which postgres is installed, it goes through. No hassles in that. Problem comes up when I'm trying to connect to the same database from a different computer in which no postgres is instal

Re: [GENERAL] Connection string

2006-08-13 Thread Bruce Momjian
Michael Fuhr wrote: > On Fri, Aug 11, 2006 at 11:40:53PM -0400, Harpreet Dhaliwal wrote: > > What kind of patch are you talking about? > > A documentation patch. Michael Meskes, to whom I was responding, > maintains ECPG. I was asking whether he wanted me to submit a patch > to fix misleading pa

Re: [GENERAL] Connection string

2006-08-13 Thread Richard Broersma Jr
> What do i do next buddy? > ~harpreet When you created your database using PGadmin 3, was PGadmin 3 on your Postgresql Server or was it on the client machine that you are trying to establish an ECPG connection from? I just want to be sure that you are infact able to connect to your database fr

Re: [GENERAL] Connection string

2006-08-13 Thread Michael Fuhr
On Sun, Aug 13, 2006 at 01:58:54AM -0400, Harpreet Dhaliwal wrote: > -402 sqlcode means "connection attempt to the database did not succeed" > > does this mean that my application is connecting to the database server but > somehow failing in connecting to the database dbxyz due to some > authentic

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
What do i do next buddy?~harpreetOn 8/13/06, Harpreet Dhaliwal <[EMAIL PROTECTED] > wrote:i started the postmaster using pg_ctl in user a/c jsb.Switched to root and ran nmap -sS localhost for port 5432 it says5432/tcp opne postgresOn 8/13/06, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: --- Har

Re: [GENERAL] Connection string

2006-08-13 Thread Harpreet Dhaliwal
i started the postmaster using pg_ctl in user a/c jsb.Switched to root and ran nmap -sS localhostfor port 5432 it says5432/tcp opne postgresOn 8/13/06, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: --- Harpreet Dhaliwal <[EMAIL PROTECTED]> wrote:> Hello,>> I'm really not able to connect to my dat

Re: [GENERAL] Connection string

2006-08-12 Thread Richard Broersma Jr
--- Harpreet Dhaliwal <[EMAIL PROTECTED]> wrote: > Hello, > > I'm really not able to connect to my database server. Does nmap -sS localhost show that port 5432 is open and used by postgresql? ---(end of broadcast)--- TIP 9: In versions below 8.

Re: [GENERAL] Connection string

2006-08-12 Thread Harpreet Dhaliwal
Also,-402 sqlcode means "connection attempt to the database did not succeed"does this mean that my application is connecting to the database server but somehow failing in connecting to the database dbxyz due to some authentication problems??? ~HarpreetOn 8/13/06, Harpreet Dhaliwal < [EMAIL PROTECTE

Re: [GENERAL] Connection string

2006-08-12 Thread Harpreet Dhaliwal
Hello,I'm really not able to connect to my database server. Let me explain the whole thing once again so that I don't miss telling anything. I have a user account jsb that owns directory /usr/local/pgsql/jsb initdb is done on the same directory i.e. /usr/local/pgsql/jsb So all the db related fil

Re: [GENERAL] Connection string

2006-08-12 Thread Michael Fuhr
On Fri, Aug 11, 2006 at 11:40:53PM -0400, Harpreet Dhaliwal wrote: > What kind of patch are you talking about? A documentation patch. Michael Meskes, to whom I was responding, maintains ECPG. I was asking whether he wanted me to submit a patch to fix misleading parts of the documentation or whet

Re: [GENERAL] Connection string

2006-08-12 Thread Harpreet Dhaliwal
What kind of patch are you talking about? On 8/11/06, Michael Fuhr <[EMAIL PROTECTED]> wrote: On Fri, Aug 11, 2006 at 06:09:16PM +0200, Michael Meskes wrote:> On Fri, Aug 11, 2006 at 07:01:55AM -0600, Michael Fuhr wrote: > > The ECPG "Connecting to the Database Server" documentation does> > have an

Re: [GENERAL] Connection string

2006-08-11 Thread Michael Fuhr
On Fri, Aug 11, 2006 at 06:09:16PM +0200, Michael Meskes wrote: > On Fri, Aug 11, 2006 at 07:01:55AM -0600, Michael Fuhr wrote: > > The ECPG "Connecting to the Database Server" documentation does > > have an example for Unix sockets with quotes: > > > > EXEC SQL CONNECT TO 'unix:postgresql://sql.

Re: [GENERAL] Connection string

2006-08-11 Thread Alvaro Herrera
Harpreet Dhaliwal wrote: > LOl..that ';' is quite obvious. Though i forgot to include that in the mail. > Sorry about that. > Also, do u think that while starting the postgresql server using 'pg_ctl > start', there is some -i option that needs to be included with it so that > the DB server accepts

Re: [GENERAL] Connection string

2006-08-11 Thread Harpreet Dhaliwal
LOl..that ';' is quite obvious. Though i forgot to include that in the mail. Sorry about that. Also, do u think that while starting the postgresql server using 'pg_ctl start', there is some -i option that needs to be included with it so that the DB server accepts tcp connections? One of the guys in

Re: [GENERAL] Connection string

2006-08-11 Thread Michael Meskes
On Fri, Aug 11, 2006 at 07:01:55AM -0600, Michael Fuhr wrote: > The ECPG "Connecting to the Database Server" documentation does > have an example for Unix sockets with quotes: > > EXEC SQL CONNECT TO 'unix:postgresql://sql.mydomain.com/mydb' AS > myconnection USER john; > > Should that be chang

Re: [GENERAL] Connection string

2006-08-11 Thread Michael Fuhr
On Fri, Aug 11, 2006 at 11:58:16AM +0200, Michael Meskes wrote: > > EXEC SQL CONNECT TO 'tcp:postgresql://192.168.0.123/xyz' USER jsb > > The correct syntax would be: > > EXEC SQL CONNECT TO tcp:postgresql://192.168.0.123/xyz USER jsb; The ECPG "Connecting to the Database Server" documenta

Re: [GENERAL] Connection string

2006-08-11 Thread Michael Meskes
On Thu, Aug 10, 2006 at 11:57:14AM -0400, Harpreet Dhaliwal wrote: > This is a simple code snippet that i've written to check if i can connect to > the postgres database server residing at IP 192.168.0.123. DB name is xyz > Also, user account jsb has the access to the database xyz. > --

Re: [GENERAL] Connection string

2006-08-10 Thread Michael Fuhr
On Thu, Aug 10, 2006 at 11:57:14AM -0400, Harpreet Dhaliwal wrote: > EXEC SQL CONNECT TO 'tcp:postgresql://192.168.0.123/xyz' USER jsb It should work if you omit the quotes or use a variable reference. Try this: EXEC SQL CONNECT TO tcp:postgresql://192.168.0.123/xyz USER jsb; or EXEC S

Re: [GENERAL] Connection string

2006-08-10 Thread Harpreet Dhaliwal
This is a simple code snippet that i've written to check if i can connect to the postgres database server residing at IP 192.168.0.123. DB name is xyz Also, user account jsb has the access to the database xyz. #include   EXEC SQL INCLUDE

Re: [GENERAL] Connection string

2006-08-09 Thread Michael Fuhr
On Thu, Aug 10, 2006 at 12:02:24AM -0400, Harpreet Dhaliwal wrote: > I already read that documentation. > > My ECPG code for connecting to the DB server is: > > EXEC SQL CONNECT TO 192.168.1.100:/xyz That format isn't shown in the documentation; the ecpg preprocessor should fail with a syntax er

Re: [GENERAL] Connection string

2006-08-09 Thread Harpreet Dhaliwal
Hi I already read that documentation.   My ECPG code for connecting to the DB server is:   EXEC SQL CONNECT TO 192.168.1.100:/xyz   i also tried   tcp:postgresql://192.168.1.100[:port][/dbname][ ?options] unix:postgresql://192.168.1.100[:port][ /dbname][?options] but unfortunately it say DB do

Re: [GENERAL] Connection string

2006-08-09 Thread Michael Fuhr
On Wed, Aug 09, 2006 at 11:02:00AM -0400, Harpreet Dhaliwal wrote: > I'm trying to connect to postgres database in a distributed environment, > say from machine X to Machine Y (Machine Y has postgres DB) > How should my connection string look like in a program in Machine X. > > EXEC SQL CONNECT T

[GENERAL] Connection string

2006-08-09 Thread Harpreet Dhaliwal
Hi,I'm trying to connect to postgres database in  a distributed environment, say from machine X to Machine Y (Machine Y has postgres DB)How should my connection string look like in a program in Machine X.EXEC SQL CONNECT TO --??? (Do i need to specify the IP of DB server?) I tried a few options

Re: [GENERAL] connection string - DNS

2005-08-08 Thread Adam O'Toole
Any insight on this at all? I can't seem to find any info on it else-where.. Thanks ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] connection string - DNS

2005-08-04 Thread Adam O'Toole
Hi there. I am connecting to my Postgresql 7.4.7 sever with psql-odbc from my VB.NET frontend. Right now I am using the Postgres server IP address in the odbc connection string. My question, I want to use a DNS server, how will my connection string change. Will I just specify the DNS address fo