similar to: Windowed Postgres Query

Displaying 20 results from an estimated 10000 matches similar to: "Windowed Postgres Query"

2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello, I have a tree structure that needs to be converted into a nested set. A great deal of work has already been done on the tree items, so maintaining the integrity of the id''s is mandatory. However I need the ability to access entire branches of the tree, which is what Nested set does. Does anyone have any suggestions on how to efficiently transfer the tree to the nested set and
2010 May 04
2
Session Store Issues on Production Server
Hello, I am using AuthLogic as my authentication gem. Everything is great on my development server. When I upload to my passenger driven production server at Dreamhost, the sessions are persisting relentlessly. In other words, a user cannot log out. I have tried implementing the Active Record session store and have changed the :secret key in initializers/session_store.rb, but for some reason,
2007 Aug 07
2
Making Validations Optional
Hello, I am working with URL validations. I want this validation to be optional if the data exists in the form submission. I have tried several things. validates_format_of :website, :if => params[:organization][:website], :with => /((http|https):\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z] {2,5}(([0-9]{1,5})?\/.*)?/, :message => "Please enter a valid url" Of
2009 Nov 03
12
Mysql::Error: query: not connected
Hi there! I am PHP developer and trying to learn ROR. Currently I am building my first Rails website (OS X Snow Leopard, TextMate) and decided to switch from sqlite to mysql. After many-many hours of searching the internet I managed to install mysql gem. Now I get this error when I try to run rake migrations: rake aborted! Mysql::Error: query: not connected: CREATE TABLE `schema_migrations`
2006 Mar 29
3
MySQL in dev, Postgres in prod - differences in "LIKE" query
Hi everyone, I run MySQL in my dev environment, but Postgres in my production environment (out of necessity). I''m having trouble finding a way to write a query with a LIKE condition that is supported as case insensitive in both databases. Right now, I have this: @query = "m" # for example @people = Person.find(:all, :conditions => ["last_name LIKE ?", @query +
2005 Dec 15
1
Variable '%r' doesn't transfomr in Postgres query
Hi, i'm using postgres for authorization. When I switched from a4 to a5 authorization stoped working. Query in conf file for postgres looks like this: password_query = select password from auth('%u','%r'); But in logs, the transformed query looks like this: Performing query: select password from auth('test','%r'); Looks like you don't transform that
2010 Oct 05
2
Is it possible to query on virtual attributes?
I have a Person model with attributes first_name and last_name. I want to implement autocomplete search that looks that the entire name. Hence I have a method: def full_name self.first_name + " " + self.last_name end Is it possible for me to query on full_name and have rails match the first_name and last_name fields? I currently receive this error when I try, because full_name
2012 Jun 29
1
Fastest way to find the total length of your postgres query
Hello, I know in ruby that when you want to find the size of your query say [1,2,3,4,5,6] would provide 6 as the total size, length, or even count. When I try to use size, length, or count on my application, I would get a pretty darn slow performance (takes around 10 seconds to load each count and I do it twice). Is there another faster way to get the total size from the postgres query? I am
2010 May 12
10
Rails and PostgreSQL ???
Hi every one How are you? after a days and searching in forums i still can not find some things that helping me to connect Rails with postgre SQL of course those are helpful but not for a stupid person like me :D So i need my friends helping me here and advice me to how can i connect this two things (ROR and Postgre Sql) I need your help so much My eyes going blind because of searching and
2010 Jan 25
3
Dynamic attributes!
I want to create a general model ''Product'' that I will be able to store several attributes in it. For example the attributes :id :name :description are pretty stantard. So each product will have this attributes. However, I wanted to know if it is possible to create dynamic attributes. In the case of a cell phone device I might want to store the IMEI of the phone, this
2010 Jun 09
4
db connection issues in production but not in dev mode
We have an application Ruby on rails, which fires a number of queries to the database. I Suspect it is connection timeout error or something When we run the application in development mode, it works as expected. However when we switch to Production mode, we get the following error in Postgre console: -------------------------- LOG: could not receive data from client: No connection could be made
2009 May 14
3
Mysql query is not working
Please, Can anyone help me to execute this query? SELECT * FROM table WHERE customer_id IN (SELECT IF(1 <> 2,''SELECT customer_id FROM customers'',''SELECT customer_id FROM company'')) Regards... -- Posted via http://www.ruby-forum.com/.
2010 Apr 23
4
New to rails - apparently need patch to use PostgreSQL
Help please. My first attempt at Rails, I''m trying to use PostgreSQL and I''m seeing this error. I''m also new to PostgreSQL, but the default encoding in PostgreSQL appears to be SQL_ASCII. I''m not sure if I should try and get the patch or try and change the PostgreSQL template. Sorry I''m so confused. FWIW, I''ve been a .NET MSSQL developer
2009 Sep 02
8
select_month helper
I''m trying to rewrite a fusebox-like application (Active4D plugin to 4D database) in RoR/postgres and I''m doing okay - but keep running into things that stump me. It seems like it takes me hours to figure out something that I could have written in pure code in minutes. The select_month and select_day helper has been my latest waste of time. All I''m trying to do is add
2010 Nov 10
3
using DB2 with Rails 3
I have developed a rails 3 app and for various reasons I have been compelled to try using DB2 as the underlying database system. Does anyone have much experience of using DB2 with rails 3? Any good pointers on resources? I have just been using postgres to date -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on
2010 Dec 15
6
Mysql query optimization for order condition
Hello everyone! I''ve a question that I hope someone in here would be able to answer. Today I was writing a simple test for a method that takes the last "n" (where n is an integer) users that signed up on my web app. I know it''s a simple method, but then I started to think about the optimal way to query the DB, and I tried different options. The first thing I did
2010 Sep 23
8
HowTo; Rails 3, having Tabs that load content via jQuery ... No Page Refesh
Hello, I''m interested in learning the correct/smart approach for implementing a web page with tabs and a content panel... When the tab is clicked by the user the tab''s content is fetched and inserted with jQuery... no page refresh... Example, Facebook, when you click Photos or Events, it doesn''t refresh the browser, just replaces the content with AJAX in the
2010 Oct 27
4
Anything special needed to migrate test::unit tests from Rails 2x to Rails3?
Looks like I''ve gotten my app upgraded successfully, at least in the browser. When I ''rake test'' I get no love. I know I can start digging through the Rails rake tasks, first want to see if anyone has an idea what is going on: DKMac:creditcompare3 DK$ rake test (in /Users/DK/Documents/ror/projects/creditcompare3) DKMac:creditcompare3 DK$ (requesting verbose fares just
2007 Feb 03
1
Postgres + tsearch2, migrations, and unit testing
I''m sure people have encountered this before, but I''ve been unsuccessful at finding anything about it. Basically, I got a rails app that uses postgres and tsearch2 for some full text indexing and I''d like to be performing unit tests. Now, there''s the whole deal of how to get the test database to load all the tsearch2 information properly. I tried to come up
2010 Jul 22
13
Sqlite3 busy and yet server has no load nor concurrency
Hi, Strange behavior here. On my dev machine code works, but on the production machine I get the dreaded: SQLite3::BusyException: database is locked INSERT INTO "comments" [...] What kind of bug could yield such behavior? It''s impossible the database times out, there are no concurrent requests coming in, and the db is only 150kB. Is there a possible race condition? Caching