Printing of logs in Rust development PostgreSQL stored procedure

You can use Rust's standard macros directly to print:

eprintln!("test_sql_speed: {:?}", difference);

will be printed to PostgreSQL's STDERR.

If the log dump function of PostgreSQL is not enabled, the default is:

/var/log/postgresql/

in the log file in the directory.

If the log dump function is enabled, it will go to the log directory under the data directory, but this speed is a bit slow, and it will take a few seconds to come out.

It is best not to open log dumps for local debugging, but directly monitor the /var/log/postgresql/postgresql-10-main.log file.

{{o.name}}
{{m.name}}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324029855&siteId=291194637