CREATE TABLE attributes
(
   fid serial NOT NULL, 
   char_field "char", 
   bigint_field bigint, 
   boolean_field boolean, 
   character_field character, 
   character_varying_field character varying, 
   date_field date, 
   double_precision_field double precision, 
   integer_field integer, 
   numeric_field numeric, 
   text_field text, 
   timestamp_with_time_zone_field timestamp with time zone, 
   time_without_time_zone_field time without time zone, 
   uuid_field uuid, 
   citext_field citext, 
   PRIMARY KEY (fid)
);
SELECT AddGeometryColumn ('attributes','polygon',0,'POLYGON',2);

-- Insert first row with all columns filled: 
INSERT INTO attributes(char_field
            , bigint_field
            , boolean_field
            , character_field
            , character_varying_field
            , date_field
            , double_precision_field
            , integer_field
            , numeric_field
            , text_field
            , timestamp_with_time_zone_field
            , time_without_time_zone_field
            , uuid_field
            , citext_field
            , polygon)
    VALUES ('g'
           , 123456789
           , true
           , 'h'
           , 'Hello world'
           , now()::date
           , 12345.678
           , 1234
           , 564
           , 'This is a lot of text'
           , now()::timestamp with time zone
           , now()::timestamp without time zone
           , md5(random()::text || clock_timestamp()::text)::uuid
           , 'This is a citext text field, which means CaSe-InSeNsItIvE'
           , st_geomfromtext('POLYGON((1049316.400009 7475364.7444164,1057390.0611206 7475364.7444164,1057390.0611206 7478708.8644036,1049316.400009 7478708.8644036, 1049316.400009 7475364.7444164))'));
-- Insert second row with only the polygon filled and the rest the default values:
INSERT INTO attributes(polygon)
    VALUES (st_geomfromtext('POLYGON((1049316.400009 7475364.7444164,1057390.0611206 7475364.7444164,1057390.0611206 7478708.8644036,1049316.400009 7478708.8644036, 1049316.400009 7475364.7444164))'));
--
INSERT INTO attributes(char_field
            , bigint_field
            , boolean_field
            , character_field
            , character_varying_field
            , date_field
            , double_precision_field
            , integer_field
            , numeric_field
            , text_field
            , timestamp_with_time_zone_field
            , time_without_time_zone_field
            , uuid_field
            , citext_field
            , polygon)
    VALUES (NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL
           , NULL);
           
           