array[10]

array[10]

Post by Marco Kaerg » Thu, 14 Aug 2003 02:30:04



hi there,

i have got a problem concerning arrays in postgres
i created a function in which i want to know if the index 8 of var_array
ist not NULL:

IF var_array[8] IS NOT NULL

        THEN

        (query)

        END IF;

then i call the function and the query is submitted, allthough
var_array[8] is 'NULL'

any solutions for that problem?

thanx!

  signature.asc
< 1K Download
 
 
 

array[10]

Post by Joe Conw » Thu, 14 Aug 2003 02:58:38



> hi there,

> i have got a problem concerning arrays in postgres
> i created a function in which i want to know if the index 8 of var_array
> ist not NULL:

> IF var_array[8] IS NOT NULL

>    THEN

>    (query)

>    END IF;

> then i call the function and the query is submitted, allthough
> var_array[8] is 'NULL'

 From your question it appears that you think 'NULL' (with single
quotes) and NULL (without single quotes) are the same thing -- they are
not. The string literal 'NULL' is nothing more than a four letter
string. NULL, on the other hand, is a special value meaning that the
data is unknown.

Currently Postgres does not even support NULL elements in arrays,
although if you test for a non-existing subscript the result is NULL.

Why don't you give us a complete (i.e. the entire function) example of
what you are trying to do, along with the specific query you believe
gives the wrong result, and then maybe we can be of more help.

Joe

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command


 
 
 

1. Sun Storage Array and Sybase (4.9.2 or System 10)

Does anyone know if Sybase (4.9.2 or System 10) has been tested with
Sun's new Storage Array (SA)?  We're considering a SA configuration (a SS1000
and a 18 gig SA) and wondered if the SA and Sybase are compatible.  Any
experiences or comments would be welcome. Thanks in advance...

Ron

* Disclaimer - My opinions are my own...  

2. SQL DB Maintenance plan not removing files

3. Run-time error 10 - This array is fixed or temproarily locked

4. Server Systems Operations ---Milpitas, CA

5. System 10 - DISK Array Problem

6. FUJITSU Hardware/Software Needed!!!

7. Error 10 - Locked Array or Fixed

8. anyone else with mod_perl/apache and 7.1

9. HP Model 10/20 Array Performance

10. Sybase 10.0.2 and Sun's Storage Arrays

11. 10.10.10.10 unstable? or other gen'l reasons for web problems?

12. Urgent--Newbie, please Help!:-)--TOP 10 Plus Increments of the next TOP 10