Thread: Fwd: Question
---------- Forwarded message ----------
From: German Raul Hoyos Parravicino <rhoyos@gmail.com>
Date: Mar 7, 2006 3:36 PM
Subject: Question
To: pgsql-general-owner@postgresql.org
Dear Administrator:
I have a problem developing a ECPG program. I am making a programa using FETCH, when the second row is sent the following message appear:
==>sqlcode [-213] msg[NULL value without indicator in line 1192.]
My select is:
EXEC SQL FETCH cursor_onlyweb
INTO
:t_token,
:t_institucion,
:t_usuario,
:t_horasistema,
:t_pan,
:t_prcode,
:t_amount,
:t_acqinst,
:t_source,
:t_datosreq;
INTO
:t_token,
:t_institucion,
:t_usuario,
:t_horasistema,
:t_pan,
:t_prcode,
:t_amount,
:t_acqinst,
:t_source,
:t_datosreq;
Is it possible to use something similar to "isnull" in Oracle?
Thanks
Raul
On Tue, Mar 07, 2006 at 05:09:56PM -0500, German Raul Hoyos Parravicino wrote: > I have a problem developing a ECPG program. I am making a programa using > FETCH, when the second row is sent the following message appear: > > ==>sqlcode [-213] msg[NULL value without indicator in line 1192.] [...] > Is it possible to use something similar to "isnull" in Oracle? Are you looking for the SQL-standard COALESCE? test=> SELECT COALESCE('foo', 'bar'); coalesce ---------- foo (1 row) test=> SELECT COALESCE(NULL, 'bar'); coalesce ---------- bar (1 row) See also the ECPG documentation on using indicators to detect NULL. -- Michael Fuhr
Hello List, I currently recompiled postgresql-8.0.1 for Solaris 9, with the --enable-thread-safety, to appease the install of Slony-I which worked wonderfully I used the following configure line: ./configure --enable-thread-safety --without-readline and the remainder of the defaults were fine. I then, make all'd and make install'd. Slony-I was a successful build as well after pointing to the new library and include folders. The issue I have is, that I actually want readline compiled in. This feature allows my command buffer to exist. My 2nd round of compiling has a more lengthy ./configure line... no matter what I use and include, I can't get the configure script to work, UNLESS I specify --without-readline I have the prebuilt 5.1 of readline from www.sunfreeware.com installed. I know where the lib and include directories are located and I'm including those with the correct command line options. I know, especially because I can get successful configures --with-perl and a few other options, where I also need to specify the lib and include folders for the features. Has anybody seen an issue with compiling "readline" into postgresql-8.0.1? The pre-built postgresql-8.0.1 from sunfreeware works WITH readline, but doesn't have --enable-thread-safety. Anyway, thanks in advance. By the way, Slony-I is really cool!
Attachment
The syntax in Oracle is "is null" or "is not null" as in: select count(*) from module_master where gatekeeper_status is null; And yes that does work in PostGreSql. Now if your talking about the Oracle function NVL, for Null Value, no that does not work and I don't see a similar function in PostGreSql. You could create one easily enough. Dick Goulet Senior Oracle DBA Oracle Certified DBA -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Michael Fuhr Sent: Tuesday, March 07, 2006 6:45 PM To: German Raul Hoyos Parravicino Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Fwd: Question On Tue, Mar 07, 2006 at 05:09:56PM -0500, German Raul Hoyos Parravicino wrote: > I have a problem developing a ECPG program. I am making a programa using > FETCH, when the second row is sent the following message appear: > > ==>sqlcode [-213] msg[NULL value without indicator in line 1192.] [...] > Is it possible to use something similar to "isnull" in Oracle? Are you looking for the SQL-standard COALESCE? test=> SELECT COALESCE('foo', 'bar'); coalesce ---------- foo (1 row) test=> SELECT COALESCE(NULL, 'bar'); coalesce ---------- bar (1 row) See also the ECPG documentation on using indicators to detect NULL. -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend
On Wed, Mar 08, 2006 at 09:07:00AM -0500, Goulet, Dick wrote: > The syntax in Oracle is "is null" or "is not null" as in: > > select count(*) from module_master where gatekeeper_status is null; That works if you want to exclude those rows altogether. > And yes that does work in PostGreSql. Now if your talking about the > Oracle function NVL, for Null Value, no that does not work and I don't > see a similar function in PostGreSql. You could create one easily > enough. What does NVL do? From the examples I've seen it looks like COALESCE. Oracle themselves recommends COALESCE: http://www.oracle.com/technology/oramag/oracle/05-jul/o45sql.html "Oracle Database supports several functions that are similar to COALESCE. These include NVL2, NULLIF, and NVL. (Take time to read about these functions in the Oracle SQL Reference manual.) We recommend COALESCE over NVL, because COALESCE can handle more than just two arguments and it's part of the SQL standard. When COALESCE isn't enough, you may be able to find refuge in CASE expressions, which are also covered in Oracle SQL Reference." PostgreSQL supports CASE as well. -- Michael Fuhr
You also need termcap 1.3.1 installed alongside readline 5.1. Search the mailing lists for termcap-1.3.1 and find my other post which has a download link, or search for termcap in Google. Andy On Wed, 08 Mar 2006 01:26:59 -0500, Louis Gonzales <louis.gonzales@linuxlouis.net> wrote: > Hello List, > I currently recompiled postgresql-8.0.1 for Solaris 9, with the > --enable-thread-safety, to appease the install of Slony-I which worked > wonderfully > I used the following configure line: > > ./configure --enable-thread-safety --without-readline > > and the remainder of the defaults were fine. > > I then, make all'd and make install'd. Slony-I was a successful build > as well after pointing to the new library and include folders. > > The issue I have is, that I actually want readline compiled in. This > feature allows my command buffer to exist. > > My 2nd round of compiling has a more lengthy ./configure line... no > matter what I use and include, I can't get the configure script to work, > UNLESS I specify --without-readline > > I have the prebuilt 5.1 of readline from www.sunfreeware.com installed. > I know where the lib and include directories are located and I'm > including those with the correct command line options. I know, > especially because I can get successful configures --with-perl and a few > other options, where I also need to specify the lib and include folders > for the features. > > Has anybody seen an issue with compiling "readline" into > postgresql-8.0.1? The pre-built postgresql-8.0.1 from sunfreeware works > WITH readline, but doesn't have --enable-thread-safety. > > Anyway, thanks in advance. By the way, Slony-I is really cool! > > > !DSPAM:14,440e796c49411918620106! > >
Hello List, I've compiled successfully, postgreSQL-8.0.1 on Solaris 9 with --enable-thread-safety, for use with Slony-I. A 2nd server has Solaris 10 - when I attempt the same ./configure WITH --enable-thread-safety, I get an error about *** Thread-safety requires POSIX signals, which are not supported by your *** operating system. Has anybody crossed this bridge? TIA
Louis Gonzales wrote: > Hello List, > I've compiled successfully, postgreSQL-8.0.1 on Solaris 9 with > --enable-thread-safety, for use with Slony-I. > > A 2nd server has Solaris 10 - when I attempt the same ./configure WITH > --enable-thread-safety, I get an error about > > *** Thread-safety requires POSIX signals, which are not supported by your > *** operating system. There is more information in that message which tells you were to look for the failure. -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. +
Bruce, thanks for the help. did you have any supplemental suggestions that would 'help?' Bruce Momjian wrote: >Louis Gonzales wrote: > > >>Hello List, >>I've compiled successfully, postgreSQL-8.0.1 on Solaris 9 with >>--enable-thread-safety, for use with Slony-I. >> >>A 2nd server has Solaris 10 - when I attempt the same ./configure WITH >>--enable-thread-safety, I get an error about >> >>*** Thread-safety requires POSIX signals, which are not supported by your >>*** operating system. >> >> > >There is more information in that message which tells you were to look >for the failure. > > >
Hello, I succesfully compiled PGSQL 8.0.4 on solaris 10 (sparc). I used gcc and used CFLAGS="-O3 -pthreads". My configure instructions are as such: configure --with-includes=/usr/local/include --with-openssl -with-includes=/usr/local/ssl /include/ -with-libs=/usr/local/lib -with-libs=/usr/local/ssl/lib -enable-thread-safety my gcc specs are as such: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls Thread model: posix gcc version 3.3.2 gcc was taken from sunfreeware.com Same config also worked with SOL9 (sparc) -- <>< SALVATION -> http://www.rbc.org/odb/odb.shtml <>< ----- Original Message ---- From: Louis Gonzales <louis.gonzales@linuxlouis.net> To: Bruce Momjian <pgman@candle.pha.pa.us> Cc: pgsql-admin@postgresql.org Sent: Thursday, March 9, 2006 12:36:35 AM Subject: Re: [ADMIN] Solaris 10/postgreSQL-8.0.1/--enable-thread-safety Bruce, thanks for the help. did you have any supplemental suggestions that would 'help?' Bruce Momjian wrote: >Louis Gonzales wrote: > > >>Hello List, >>I've compiled successfully, postgreSQL-8.0.1 on Solaris 9 with >>--enable-thread-safety, for use with Slony-I. >> >>A 2nd server has Solaris 10 - when I attempt the same ./configure WITH >>--enable-thread-safety, I get an error about >> >>*** Thread-safety requires POSIX signals, which are not supported by your >>*** operating system. >> >> > >There is more information in that message which tells you were to look >for the failure. > > > ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster
renneyt@yahoo.com wrote: >Hello, I succesfully compiled PGSQL 8.0.4 on solaris 10 (sparc). > >I used gcc and used CFLAGS="-O3 -pthreads". > >My configure instructions are as such: > >configure --with-includes=/usr/local/include --with-openssl -with-includes=/usr/local/ssl >/include/ -with-libs=/usr/local/lib -with-libs=/usr/local/ssl/lib -enable-thread-safety > >my gcc specs are as such: >Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/specs >Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls >Thread model: posix >gcc version 3.3.2 > >gcc was taken from sunfreeware.com > >Same config also worked with SOL9 (sparc) > > > > Thanks, I had tried CFLAGS="-D_someOption -pthreads" and that hadn't worked, I'll give yours a whirl what you have suggested. did you use "-"enable-thread-safety or "--"enable-thread-safety?
-enable-thread-safety should take care of all this and add -pthreads to the link line. Please look at config.log or email it to me privately. /config/acx_pthread.m4 tries all link flags and should have picked up -pthreads. --------------------------------------------------------------------------- Louis Gonzales wrote: > renneyt@yahoo.com wrote: > > >Hello, I succesfully compiled PGSQL 8.0.4 on solaris 10 (sparc). > > > >I used gcc and used CFLAGS="-O3 -pthreads". > > > >My configure instructions are as such: > > > >configure --with-includes=/usr/local/include --with-openssl -with-includes=/usr/local/ssl > >/include/ -with-libs=/usr/local/lib -with-libs=/usr/local/ssl/lib -enable-thread-safety > > > >my gcc specs are as such: > >Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/specs > >Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls > >Thread model: posix > >gcc version 3.3.2 > > > >gcc was taken from sunfreeware.com > > > >Same config also worked with SOL9 (sparc) > > > > > > > > > Thanks, > I had tried CFLAGS="-D_someOption -pthreads" and that hadn't worked, > I'll give yours a whirl what you have suggested. > did you use "-"enable-thread-safety or "--"enable-thread-safety? > > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. +