php / doc-en

English PHP documentation
502 stars 732 forks source link

Undocumented PDO_PGSQL constants #1393

Open AndrolGenhald opened 2 years ago

AndrolGenhald commented 2 years ago

The documentation doesn't mention these (obtained through reflection):

    public const PGSQL_TRANSACTION_IDLE = 0;
    public const PGSQL_TRANSACTION_ACTIVE = 1;
    public const PGSQL_TRANSACTION_INTRANS = 2;
    public const PGSQL_TRANSACTION_INERROR = 3;
    public const PGSQL_TRANSACTION_UNKNOWN = 4;

I also noticed that using reflection with the PDO class with the PGSQL driver installed doesn't list the methods documented on that page. I assume this has something to do with the way the extension modifies an already existing class, is it worth opening a php-src issue or is this expected behavior?

cmb69 commented 2 years ago

Right; these 5 constants are available as of PHP 7.0.0 at least.

I also noticed that using reflection with the PDO class with the PGSQL driver installed doesn't list the methods documented on that page. I assume this has something to do with the way the extension modifies an already existing class, is it worth opening a php-src issue or is this expected behavior?

That is a known issue, since the driver specific methods are implemented via a mechanism similar to __call(). I think there is an open issue about that in the old bug tracker.