psql

dyld: lazy symbol binding failed: Symbol not found: _PQsetErrorContextVisibility

一笑奈何 提交于 2020-06-11 18:09:21
问题 On running $ psql I get this error dyld: lazy symbol binding failed: Symbol not found: _PQsetErrorContextVisibility Referenced from: /usr/local/bin/psql Expected in: /usr/local/lib/libpq.5.dylib dyld: Symbol not found: _PQsetErrorContextVisibility Referenced from: /usr/local/bin/psql Expected in: /usr/local/lib/libpq.5.dylib Abort trap: 6 I have tried a few things: few posts suggested to update brew few suggested adding /usr/local/bin/psql to the ~/.bash_profile and restarting the system few

dyld: lazy symbol binding failed: Symbol not found: _PQsetErrorContextVisibility

一世执手 提交于 2020-06-11 18:08:30
问题 On running $ psql I get this error dyld: lazy symbol binding failed: Symbol not found: _PQsetErrorContextVisibility Referenced from: /usr/local/bin/psql Expected in: /usr/local/lib/libpq.5.dylib dyld: Symbol not found: _PQsetErrorContextVisibility Referenced from: /usr/local/bin/psql Expected in: /usr/local/lib/libpq.5.dylib Abort trap: 6 I have tried a few things: few posts suggested to update brew few suggested adding /usr/local/bin/psql to the ~/.bash_profile and restarting the system few

psql - unable to execute the command - permission denied error

試著忘記壹切 提交于 2020-06-01 06:13:45
问题 When trying to run a SQL script using psql I am getting permission denied error. Steps followed - opened up normal Bash interactive shell Ran the command as below sudo -u postgres -s /bin/bash tried running the below pgsql - I provided the read write access to the pega folder; what else needs to be done to move the pgsql file to postgres library. /Library/PostgreSQL/12/bin/psql -U dbusername dbpassword </Users/rr/Documents/pega/pega8db.pgsql got the below error bash: /Users/rr/Documents/pega

psql - unable to execute the command - permission denied error

冷暖自知 提交于 2020-06-01 06:12:13
问题 When trying to run a SQL script using psql I am getting permission denied error. Steps followed - opened up normal Bash interactive shell Ran the command as below sudo -u postgres -s /bin/bash tried running the below pgsql - I provided the read write access to the pega folder; what else needs to be done to move the pgsql file to postgres library. /Library/PostgreSQL/12/bin/psql -U dbusername dbpassword </Users/rr/Documents/pega/pega8db.pgsql got the below error bash: /Users/rr/Documents/pega

Laravel postgres sql Case Insensitive Like

浪尽此生 提交于 2020-05-17 06:04:24
问题 I have a postgres sql query in Laravel : $_query = Article::join('users', 'articles.user_id', '=', 'users.id') ->select('users.*','articles.*'); if( array_key_exists('title', $parameters) && $parameters['title'] != '' ) $_query->whereRaw( " LOWER(nbl_region_ref.region) like LOWER('%?%')", array( trim($parameters['region']) ) ); $result = $_query->get(); Output/Error: 'PDOException' with message 'SQLSTATE[42P18]: Indeterminate datatype: 7 ERROR: could not determine data type of parameter $2'

Django models: database design for user and follower

邮差的信 提交于 2020-05-14 10:52:06
问题 In Django model I am making a table 'followers', which has: user's id. (this is followed by) user's id (this is follower) that's simple a user can follow other users. How should I define the model in Django? I tried this, but does not work: user = models.ForeignKey('self') follower_id = models.ForeignKey('self') How should this be done? thanks 回答1: The 'self' argument won't work unless you have a model called self . Assuming that your assignment model is called Following , and you're using

How to alter the ownership of some tables inside a database from postgres to another user?

╄→гoц情女王★ 提交于 2020-04-16 05:54:28
问题 I have a database which contains significant number of tables. Some of the tables are owned by postgres user and not the one I created. I want to transfer the ownership of such tables to the one I created,because when doing django-migrations, you can only set one user and password for the psql connection and that user doesnt have access to the tables owned by the postgres user, thus the migrations are not completed. So far, googling didn't help as they suggest either using ALTER or REASSIGN

How to put psql on the path when using Postgres.app on OS X?

假装没事ソ 提交于 2020-02-26 11:32:40
问题 I've installed Postgres93 on my Mac. I can open the application, and "Open psql" through the app which opens up a command line interface with psql. However, when I type $ which psql nothing is returned. The installation path is /Applications/Postgres93.app . How do I make $ which psql show the correct result? Mac OS X - Mavericks PostgreSQL package, I'm not as sure about. I went here and downloaded it - http://postgresapp.com/ 回答1: It appears that you installed Heroku's Postgres.app , which

How to put psql on the path when using Postgres.app on OS X?

一个人想着一个人 提交于 2020-02-26 11:29:39
问题 I've installed Postgres93 on my Mac. I can open the application, and "Open psql" through the app which opens up a command line interface with psql. However, when I type $ which psql nothing is returned. The installation path is /Applications/Postgres93.app . How do I make $ which psql show the correct result? Mac OS X - Mavericks PostgreSQL package, I'm not as sure about. I went here and downloaded it - http://postgresapp.com/ 回答1: It appears that you installed Heroku's Postgres.app , which

How to put psql on the path when using Postgres.app on OS X?

柔情痞子 提交于 2020-02-26 11:29:25
问题 I've installed Postgres93 on my Mac. I can open the application, and "Open psql" through the app which opens up a command line interface with psql. However, when I type $ which psql nothing is returned. The installation path is /Applications/Postgres93.app . How do I make $ which psql show the correct result? Mac OS X - Mavericks PostgreSQL package, I'm not as sure about. I went here and downloaded it - http://postgresapp.com/ 回答1: It appears that you installed Heroku's Postgres.app , which