Search Postgresql Archives

Re: Connection string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 SQL BEGIN DECLARE SECTION;
  char *connstr = "tcp:postgresql://192.168.0.123/xyz";
  EXEC SQL END DECLARE SECTION;

  EXEC SQL CONNECT TO :connstr USER jsb;

-- 
Michael Fuhr


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux