domain2Row domain2_dom%ROWTYPE; adServerLoadRow domain2_dom%ROWTYPE; ... SELECT * INTO domain2Row FROM domain2_dom WHERE domain_name_dom = quote_literal(domainName); adServerLoadRow = domain2Row;
I want to go through a series of checks to see if I should set a field to null in the adServerLoadRow. I will not know in advance which fields I will need to check nor their data types.
Assuming I have identified field X as one which I want to set to null, I want to be able to perform the following assignment;
adServerLoadRow.X = NULL;
However, I can't seem to do this. I thought about just declaring a variable and not assigning anything to it, so it would be null. Then I could do the following
adServerLoadRow.X = aNullVariable;
The problem is that I won't know in advance whether the field is numeric or text, so I won't know which null variable to use.
I'm constrained to use plpgsql, so alternate language solutions won't help me.