similar to: How do I close DB connections?

Displaying 20 results from an estimated 10000 matches similar to: "How do I close DB connections?"

2006 Apr 20
7
Rails + postgres case insensitive searches.
Hello all I am wondering how rails handles case sensitivity in databases. If I do a Person.find_all_by_name("tim") in mysql I would expect to get tim, TIm, and Tim. Do I only get tim in postgres? How do other people deal with this? Do you resort to find_by_sql for all your postgres queries to get case insensitive results?
2009 Jun 23
1
[PATCH server] added ovirt-wait4service and invokation in installer to wait for psql/ldap
FIXME this patch isn't complete, still need to figure out the ldap command to wait for that service, something along the lines of: ldapsearch -b dc=priv,dc=ovirt,dc=org -x (but how will we parse the base from the installer? also this cmd fails, how to fix?) --- installer/modules/ovirt/manifests/ovirt.pp | 8 +++++- installer/modules/ovirt/manifests/postgres.pp | 13 ++++++---
2006 Mar 06
6
Executing SQL in rails, and the types of the data returned
Hi, Every once in while I have to run SQL by hand, in my models mostly. But I''m wondering if there is a better way of doing it than I do. And, I have a question concerning types of the fields in the result the query produces. First, about the types. In a certain model, to get and return the value of a boolean function, I have to do: result =
2008 Jun 03
11
rake db:migrate not working
When I run the rake db:migrate command, I get this: C:\testror\depot>rake db:migrate --trace (in C:/testror/depot) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! 182: Le systÞme d''exploitation ne peut pas exÚcuter %1. - c:/ruby/ lib/ruby/gem
2007 Oct 30
4
Postgresql and shell script
I have a shell script (sh) where I create a user and import data to a postgres database <snip> su -c "createuser -A -D -P $PG_user" postgres su -c "psql -d$PG_database -h localhost -U$PG_user -W -f postgresql.sql " postgres </snip> when the script executes those command, it ask for a password, how could I do this without have to enter the passwd, I would like that
2007 Apr 10
2
postgres 7 - CentOS 4.4
Hi Firstly apologies but i have to install an app that uses postgres but i am more a MySQL/Oracle guy so i maybe doing something really wrong here.. I am following instructions for creating a DB user and encountering this # createuser -ADP -U postgres foo Enter password for new user: Enter it again: createuser: could not connect to database template1: FATAL: IDENT authentication failed for
2007 Jun 03
1
postgres gem -- LoadError
I''m at a loss to explain why the postgres gem will not work on my new server. I''ve gotten it working on several other servers in the past. The major difference between then and now is that I''m using a newer version of PostgreSQL. 8.x as opposed to 7.x. === Server setup OS: Fedora Core 6 (Commands shown with "$" are performed as the same user that mongrel
2006 Jul 05
2
get value from array.
hi, Im running the following sql statment which returns 1 result. pSql = "SELECT sum(amount) FROM payments WHERE expected_pay_date LIKE ''"+pWholeDate+"%'' AND invoice_id IS null " aResult = Payment.find_by_sql(pSql) how can I get the result of this? (when doing @aResult.inspect it
2013 May 14
1
PuppetDB Cannot Find Postgresql Driver
Puppet 3.3.1 // CentOS release 6.4 (Final) rpm -qa | grep puppet puppetlabs-release-6-7.noarch puppet-3.1.1-1.el6.noarch puppetdb-1.3.0-1.el6.noarch puppet-server-3.1.1-1.el6.noarch puppetdb-terminus-1.3.0-1.el6.noarch Installed from yum packages: Running Transaction Installing : puppetdb-1.3.0-1.el6.noarch
2005 Mar 06
3
permission error in rake''s clone_structure_to_test
Hello, When I try to run "rake clone_structure_to_test" on my project, I get the following errors: $ rake clone_structure_to_test (in /home/www/cedscreening) psql:db/development_structure.sql:8: ERROR: permission denied to set session authorization psql:db/development_structure.sql:16: ERROR: permission denied for schema public psql:db/development_structure.sql:34: NOTICE: CREATE
2006 May 31
1
find by sql
Hi I have the following code, which makes use of an sql statment to get the results required. However this just doesnt seem right for rails, as ive managed to develop the whole project without using any other pure sql. Is there a cleaner way of doing this, but gaining the same results. thanks scott #sql to find all invoices pSql = "SELECT DISTINCT invoices.id,
1999 Nov 13
1
postgresql package for R
A preliminary release of my postgres package for R is at http://www.nceas.ucsb.edu/~keitt/R/postgres.tgz It allows one to read and write data frames to and from a postgres database, execute queries and has an experimental "proxy" interface that allows you to access postgres tables using the standard, local data frame model. All accesses to the data frame generate the appropriate
1999 Nov 13
1
postgresql package for R
A preliminary release of my postgres package for R is at http://www.nceas.ucsb.edu/~keitt/R/postgres.tgz It allows one to read and write data frames to and from a postgres database, execute queries and has an experimental "proxy" interface that allows you to access postgres tables using the standard, local data frame model. All accesses to the data frame generate the appropriate
2008 Sep 13
4
Setting up RoR with Postgresql ---heeellpp!
Hi there, I''ve been trying for a few hours now to get RoR and postgresql talking - but I''m very confused about what''s going on (I''m running windows btw). I haven''t created a database in postgresql (I''m assuming that RoR will do that?) my database.yml looks like this: production: adapter: ruby-postgres database: rails_production
2016 Nov 03
2
how to install postgresql ip4r
ok, so I removed the default postgresql install and installed it from the software collections.. following the instructions at https://www.softwarecollections.org/en/scls/rhscl/rh-postgresql95/ and I get this [root at home1p /home/jason]$scl enable rh-postgresql95 bash [root at HOME1P jason]# postgresql-setup --initdb * Initializing database in
2006 Feb 26
3
simplify
Trying to use Eric''s help and Amy Hoy''s page of playing with auto_complete and decided that the script/console is the place to rapidly test. I have this feeling that CONCAT isn''t working for postgresql... c = find_by_sql(SELECT * FROM clients WHERE CONCAT (first_name,middle_initial,last_name) = "johnadams") ^ (irb):61:
2017 Aug 27
0
Connect to postgreSQL
On Sat, 26 Aug 2017 18:35:31 -0700 Ira Sharenow via R-help <r-help at r-project.org> wrote: Can you access the postgres database through psql or some other route? Also, do you require a password to access the database from these alternatives? JWDougherty
2007 Jan 04
2
postgres and asterisk
I need to retrieve my asterisk to retrieve a values from postgresql, i am looking for some sort of application like *mysql*() app, I found one but it is only available on Suse, is there any way for doing this? Regards, O.Youssef -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Dec 28
7
2.2.2 simple_captcha upgrade error
So thanks to Craig, i got up and running on rails 2.2.2, though now i''m dealing with a whole new can of worms. I''ve done a good bit o searching and haven''t found any solid leads. I''m using the simple_captcha plugin on my site, and all is well until i call that plugin. http://www.pastie.org/347721 ActionView::TemplateError (undefined method
2005 Dec 05
1
Rails and Postgres ARRAYs
Hello list, I''ve got a Postgres table defined as create table A ( id serial primary key, names varchar(10)[], val float[] ) Although I *could* split out the names/val arrays into one or more separate tables with one-to-many relations back to table A, the actual business problem is such that I''d prefer not to do so if I can avoid it. Is there any way of reading/writing