| From: | "D(dot) Duccini" <duccini(at)backpack(dot)com> | 
|---|---|
| To: | Matthew Denny <mdenny(at)CS(dot)Berkeley(dot)EDU> | 
| Cc: | pgsql-interfaces(at)postgresql(dot)org, pgsql-novice(at)postgresql(dot)org | 
| Subject: | Re: [NOVICE] a couple of newbie question | 
| Date: | 2000-04-16 19:17:22 | 
| Message-ID: | Pine.GSO.3.96.1000416141605.6243A-100000@ra.bpsi.net | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-interfaces | 
You insert it by NOT inserting it.
insert into test_table (col_x, col_y) values (:x, :y);
you basically omit any column you do not want to insert values for
-duck
On Sun, 16 Apr 2000, Matthew Denny wrote:
> 
> I know this question is probably fairly elementary, but I could not
> find the answer in the docs or mailing list archives.  How does one handle
> NULL values in the embedded SQL interface?  For example, if I have a
> statement:
> 
> exec sql insert into test_table values(:foo, :x, :y)
> 
> and foo represents a CHAR attribute (represented by a string in C) that I
> want to set to NULL, how do I go about doing this?  Similarly, how do
> I tell that a value put into a variable by a fetch call is NULL or
> not?  
> 
> On a different note, is there any list of error codes for the actual
> postgreSQL errors, or is the only thing a user can get back is the
> text message in sqlca.sqlerrm.sqlerrmc (e.g. no associated error #)?
> 
> Any help would be greatly appreciated.
> 
> thanks,
> Matt
> 
-----------------------------------------------------------------------------
david(at)backpack(dot)com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.    
+1 651.645.9798 fax            Don't forget your BackPack!"   
-----------------------------------------------------------------------------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ivo Simicevic | 2000-04-16 21:03:12 | Re: a couple of newbie question | 
| Previous Message | Matthew Denny | 2000-04-16 18:57:38 | a couple of newbie question |