Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSQL PDO SQLSTATE[IM001]: #4683

Closed
taivo1 opened this issue Aug 12, 2014 · 4 comments
Closed

PSQL PDO SQLSTATE[IM001]: #4683

taivo1 opened this issue Aug 12, 2014 · 4 comments

Comments

@taivo1
Copy link

taivo1 commented Aug 12, 2014

I get following error: PDOException: SQLSTATE[IM001]: Driver does not support this function: driver does not support setting attributes.

It occurs when I run codeception tests using Postgres database.
So I tracked down that Postgres PDO driver does not implement ATTR_EMULATE_PREPARES attrbute

Stack trace:
#1 /vendor/yiisoft/yii2/db/pgsql/QueryBuilder.php:141
#2 /vendor/yiisoft/yii2/db/Command.php:738
#3 /vendor/yiisoft/yii2/test/InitDbFixture.php:94
#4 /vendor/yiisoft/yii2/test/InitDbFixture.php:76
#5 /vendor/yiisoft/yii2/test/FixtureTrait.php:114
#6 /vendor/yiisoft/yii2-codeception/TestCase.php:83

@samdark samdark self-assigned this Aug 12, 2014
@samdark samdark added this to the 2.0.x milestone Oct 24, 2014
@nineinchnick
Copy link
Contributor

Is this still relevant? I can't find those mentioned files.

@samdark
Copy link
Member

samdark commented Apr 9, 2015

@nineinchnick I've linked files in original post.

@schoradt
Copy link

schoradt commented Jul 4, 2016

It locks like the problem is the checkIntegrity methode in the postgresql QueryBuilder.

This Methode creates a list of SQL alter table commands and set the ATTR_EMULATE_PREPARES attribute to bypass the postgresql native prepare to fire multiple commands in one.

I test it with PHP7.0 (ubuntu 16.04) and postgresql 9.4 it works without an error.

@samdark
Copy link
Member

samdark commented Jul 4, 2016

Seems issue is outdated.

@samdark samdark closed this as completed Jul 4, 2016
@cebe cebe removed this from the 2.0.x milestone Jul 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants