### pgmock Test File Reference Source: https://github.com/jackc/pgmock/blob/master/README.md References the pgmock_test.go file for example usage of the pgmock library. This file likely contains practical demonstrations of how to set up and use pgmock for testing PostgreSQL interactions. ```go See pgmock_test.go for example usage. ``` -------------------------------- ### pgmockproxy Usage Example Source: https://github.com/jackc/pgmock/blob/master/README.md Demonstrates how to use the pgmockproxy tool to connect to a remote PostgreSQL server and log the communication. This can be used to observe the PostgreSQL wire protocol and generate mock data. ```shell $ pgmockproxy -remote "/private/tmp/.s.PGSQL.5432" F {"Type":"StartupMessage","ProtocolVersion":196608,"Parameters":{"application_name":"psql","client_encoding":"UTF8","database":"jack","user":"jack"}} B {"Type":0,"Salt":[0,0,0,0],"SASLAuthMechanisms":null,"SASLData":null} B {"Type":"ParameterStatus","Name":"application_name","Value":"psql"} B {"Type":"ParameterStatus","Name":"client_encoding","Value":"UTF8"} B {"Type":"ParameterStatus","Name":"DateStyle","Value":"ISO, MDY"} B {"Type":"ParameterStatus","Name":"integer_datetimes","Value":"on"} B {"Type":"ParameterStatus","Name":"IntervalStyle","Value":"postgres"} B {"Type":"ParameterStatus","Name":"is_superuser","Value":"on"} B {"Type":"ParameterStatus","Name":"server_encoding","Value":"UTF8"} B {"Type":"ParameterStatus","Name":"server_version","Value":"11.5"} B {"Type":"ParameterStatus","Name":"session_authorization","Value":"jack"} B {"Type":"ParameterStatus","Name":"standard_conforming_strings","Value":"on"} B {"Type":"ParameterStatus","Name":"TimeZone","Value":"US/Central"} B {"Type":"BackendKeyData","ProcessID":31007,"SecretKey":1013083042} B {"Type":"ReadyForQuery","TxStatus":"I"} F {"Type":"Query","String":"select generate_series(1,5);"} B {"Type":"RowDescription","Fields":[{"Name":"generate_series","TableOID":0,"TableAttributeNumber":0,"DataTypeOID":23,"DataTypeSize":4,"TypeModifier":-1,"Format":0}]} B {"Type":"DataRow","Values":[{"text":"1"}]} B {"Type":"DataRow","Values":[{"text":"2"}]} B {"Type":"DataRow","Values":[{"text":"3"}]} B {"Type":"DataRow","Values":[{"text":"4"}]} B {"Type":"DataRow","Values":[{"text":"5"}]} B {"Type":"CommandComplete","CommandTag":"SELECT 5"} B {"Type":"ReadyForQuery","TxStatus":"I"} F {"Type":"Terminate"} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.