elasticapm/instrumentation/packages/asyncio/psycopg_async.py [43:56]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    provider_name = "postgresql"

    def _bake_sql(self, sql):
        # If this is a Composable object, use its `as_string` method.
        # See https://www.psycopg.org/psycopg3/docs/api/sql.html
        if hasattr(sql, "as_string"):
            sql = sql.as_string(self.__wrapped__)
        # If the sql string is already a byte string, we need to decode it using the connection encoding
        if isinstance(sql, bytes):
            sql = sql.decode(self.connection.info.encoding)
        return sql

    def extract_signature(self, sql):
        return extract_signature(sql)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



elasticapm/instrumentation/packages/psycopg.py [43:56]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    provider_name = "postgresql"

    def _bake_sql(self, sql):
        # If this is a Composable object, use its `as_string` method.
        # See https://www.psycopg.org/psycopg3/docs/api/sql.html
        if hasattr(sql, "as_string"):
            sql = sql.as_string(self.__wrapped__)
        # If the sql string is already a byte string, we need to decode it using the connection encoding
        if isinstance(sql, bytes):
            sql = sql.decode(self.connection.info.encoding)
        return sql

    def extract_signature(self, sql):
        return extract_signature(sql)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



