You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
I faced with strange behaviour when I send incorrect queries. Here are my cases:
// Direct SQL query:
> INSERTINTOfake_table (id) VALUES (1)
[42P01] ERROR: relation "fake_table" does not exist
// Query via extension:$db = newSwoole\Coroutine\PostgreSQL();
$db->connect($dsn);
$db->prepare('teststmt', 'INSERT INTO fake_table (id) VALUES ($1)');
echo'Error code: ' . $db->errCode . PHP_EOL; // Expect non-zero codeecho'Error message: ' . $db->error . PHP_EOL;
> Error code: 0
> Error message: ERROR: relation "fake_table" does not exist
> LINE1: INSERTINTOfake_table (id) VALUES ($1)
// Direct SQL query:
> INSERTINTO parts (id, fake_field) VALUES (1, 'Some Data');
[42703] ERROR: column "fake_field" of relation "parts" does not exist// Query via extension:$db->prepare('teststmt2', 'INSERT INTO parts (id, fake_field) VALUES ($1, $2)');> Error code: 0> ERROR: column "fake_field" of relation"pim_part" does not exist
> LINE1: INSERTINTOpim_part (id, fake_field) VALUES ($1, $2)
Initially I was expecting an error code like in the PostgreSQL spec. But later I saw that type of errCode variable is integer. And I don't know how extension can pass error codes with letters (for example 42P01). Are there any mapping table or something like that? I'm not sure that this feature works correctly.
The text was updated successfully, but these errors were encountered:
Hi Team,
I faced with strange behaviour when I send incorrect queries. Here are my cases:
Initially I was expecting an error code like in the PostgreSQL spec. But later I saw that type of
errCode
variable is integer. And I don't know how extension can pass error codes with letters (for example42P01
). Are there any mapping table or something like that? I'm not sure that this feature works correctly.The text was updated successfully, but these errors were encountered: