@@ -628,7 +628,7 @@ public async Task InsertPostgresTypes(InsertPostgresTypesArgs args)
628628 await this . Transaction . Connection . ExecuteAsync ( InsertPostgresTypesSql , queryParams , transaction : this . Transaction ) ;
629629 }
630630
631- private const string InsertPostgresTypesBatchSql = "COPY postgres_types (c_boolean, c_smallint, c_integer, c_bigint, c_real, c_numeric, c_decimal, c_double_precision, c_money, c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_char, c_varchar, c_character_varying, c_bpchar, c_text, c_uuid, c_bytea) FROM STDIN (FORMAT BINARY)" ;
631+ private const string InsertPostgresTypesBatchSql = "COPY postgres_types (c_boolean, c_smallint, c_integer, c_bigint, c_real, c_numeric, c_decimal, c_double_precision, c_money, c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_char, c_varchar, c_character_varying, c_bpchar, c_text, c_uuid, c_bytea, c_cidr, c_inet, c_macaddr ) FROM STDIN (FORMAT BINARY)" ;
632632 public class InsertPostgresTypesBatchArgs
633633 {
634634 public bool ? CBoolean { get ; init ; }
@@ -652,6 +652,9 @@ public class InsertPostgresTypesBatchArgs
652652 public string ? CText { get ; init ; }
653653 public Guid ? CUuid { get ; init ; }
654654 public byte [ ] ? CBytea { get ; init ; }
655+ public NpgsqlCidr ? CCidr { get ; init ; }
656+ public IPAddress ? CInet { get ; init ; }
657+ public PhysicalAddress ? CMacaddr { get ; init ; }
655658 } ;
656659 public async Task InsertPostgresTypesBatch ( List < InsertPostgresTypesBatchArgs > args )
657660 {
@@ -684,6 +687,9 @@ public async Task InsertPostgresTypesBatch(List<InsertPostgresTypesBatchArgs> ar
684687 await writer . WriteAsync ( row . CText ) ;
685688 await writer . WriteAsync ( row . CUuid ) ;
686689 await writer . WriteAsync ( row . CBytea ) ;
690+ await writer . WriteAsync ( row . CCidr ) ;
691+ await writer . WriteAsync ( row . CInet ) ;
692+ await writer . WriteAsync ( row . CMacaddr ) ;
687693 }
688694
689695 await writer . CompleteAsync ( ) ;
@@ -753,7 +759,7 @@ public class GetPostgresTypesRow
753759 return await this . Transaction . Connection . QueryFirstOrDefaultAsync < GetPostgresTypesRow ? > ( GetPostgresTypesSql , transaction : this . Transaction ) ;
754760 }
755761
756- private const string GetPostgresTypesCntSql = "SELECT c_smallint , c_boolean, c_integer, c_bigint, c_real, c_numeric, c_decimal, c_double_precision, c_money, c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_char, c_varchar, c_character_varying, c_bpchar, c_text, c_uuid, c_bytea, COUNT (* ) AS cnt FROM postgres_types GROUP BY c_smallint, c_boolean, c_integer, c_bigint, c_real, c_numeric, c_decimal, c_double_precision, c_money, c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_char, c_varchar, c_character_varying, c_bpchar, c_text, c_uuid, c_bytea LIMIT 1 " ;
762+ private const string GetPostgresTypesCntSql = "SELECT c_smallint , c_boolean, c_integer, c_bigint, c_real, c_numeric, c_decimal, c_double_precision, c_money, c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_char, c_varchar, c_character_varying, c_bpchar, c_text, c_uuid, c_bytea, c_cidr, c_inet, c_macaddr, COUNT (* ) AS cnt FROM postgres_types GROUP BY c_smallint, c_boolean, c_integer, c_bigint, c_real, c_numeric, c_decimal, c_double_precision, c_money, c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_char, c_varchar, c_character_varying, c_bpchar, c_text, c_uuid, c_bytea, c_cidr, c_inet, c_macaddr LIMIT 1 " ;
757763 public class GetPostgresTypesCntRow
758764 {
759765 public short ? CSmallint { get ; init ; }
@@ -777,6 +783,9 @@ public class GetPostgresTypesCntRow
777783 public string ? CText { get ; init ; }
778784 public Guid ? CUuid { get ; init ; }
779785 public byte [ ] ? CBytea { get ; init ; }
786+ public NpgsqlCidr ? CCidr { get ; init ; }
787+ public IPAddress ? CInet { get ; init ; }
788+ public PhysicalAddress ? CMacaddr { get ; init ; }
780789 public required long Cnt { get ; init ; }
781790 } ;
782791 public async Task < GetPostgresTypesCntRow ? > GetPostgresTypesCnt ( )
0 commit comments