fix: better comment for table oid hashing

This commit is contained in:
Jindřich Moravec 2024-01-28 20:55:25 +01:00
parent 36bc15ecc5
commit b5b35ec3db

View file

@ -113,7 +113,8 @@ fn column_to_description(schema: &TableSchema, column: Column) -> anyhow::Result
})
}
/// Stable random number based on string
/// Hashes the table name into single i32 used as a substitute for the table OID
/// in the PostgreSQL protocol.
fn table_name_to_oid(table_name: &str) -> i32 {
let mut rng: Pcg64 = Seeder::from(table_name).make_rng();
rng.gen::<i32>()