Displaying 20 results from an estimated 40000 matches similar to: "Caching model metadata?"
2006 Jan 11
5
Noob - Associated Tables Find Query
I''m trying to write a football prediction game.
I have a Matches table and a Predictions table.
Each Match :has_many Predictions, and each Prediction :belongs_to a
Match
Each Match has (amongst other things) a Match.match_date field.
Each Prediction has (amongst other things) a User_id field
I''m trying to get a list of all Predictions a particular User has made
which
2006 May 18
5
Overriding default DELETE behavior with logical deletes
Hello!
I am trying to figure out how to implement *logical deletes* instead of
physical deletes using ActiveRecord. Basically, in many applications
that deal with E-Commerce, you really can''t physically delete almost
anything, because records must be kept for auditing and customer service
tracking purposes.
In the past, I''ve implemented logical deletes as follows:
1.
2006 Jan 19
3
Migrating from Mysql to PostgreSQL
I tried to use ''rake db_schema_dump'' from old MySQL database and then
use ''rake db_schema_import'' to rebuild the database in PostgreSQL. The
issue here is that only some of tables can be imported successfully.
For example, in the dumped schema.rb:
create_table "profiles", :force => true do |t|
t.column "ticker", :string, :limit
2006 Feb 16
3
Postgresql 8.1.x on CentOS 3.6
Hello everyone,
Does anyone know if there are any Postgresql 8.1.3 RPMs for CentOS 3.6?
I've looked at the Postgresql website but I couldn't find anything
under RHEL3/CentOS3. I've tried installing the RHEL4 RPMs which seem
to work. Unfortunately, I'm getting errors whenever I try to compile
PHP5 from source.
Thanks and Best Regards,
Matt
--
Stand before it and there is no
2009 Jun 04
2
RPostgreSQL segfault with LEFT JOIN
Hi,
I recently upgraded to R 2.9.0 on linux x86. After doing so, I switched to the
RPostgreSQL package for interfacing with a postgresql database. I am using
postgresql 8.3.7.
A query that works from the postgresql terminal is causing a segfault when
executed from R.
My sessionInfo, the error message, and the R code used to generate the error
are listed below.
I have noticed that a
2019 Apr 01
1
Possible bug with last_login plugin and PostgreSQL
Dear all,
I'm trying to get last_login plugin working with PostgreSQL, but seems Dovecot
doesn't handle duplicate key while updating last login time (note: same setting
works fine with MariaDB). I wonder whether it's a bug of Dovecot or i should handle
this with PostgreSQL trigger.
OS: OpenBSD 6.4 (amd64)
Dovecot: 2.2.36
PostgreSQL: 10.5
Error log:
###################
Mar 31
2011 Jun 02
2
Custom sql query for keeping quota with dict-sql
Hello!
I'd like to setup quota for for virtualusers, i'm using both maildir++
and mdbox as storage, and i'm using postgresql to keep users.
I'm keeping all users data in one table:
[...]
login text NOT NULL,
domain text,
password text,
quota_mb integer NOT NULL DEFAULT 0
[... other columns ...]
i'd like to keep present quota in such two columns:
quota_dict_bytes integer NOT
2006 Mar 02
2
[slightly-OT] postgresql 8.1.3 on intel OS X problems
Hi,
Anybody have success with postgresql 8.1.3 on a new Intel OS X box? All
hints welcome, please!
I installed postgres 8.1.3 via darwinports, and everything is great
until the initdb step.
Initdb fails on shmget saying it couldn''t allocate enough memory (see
below). So, I edited /etc/rc and increased kern.sysv.shmmax from
4194304 to 41943040 (4MB to 40MB)
After reboot and
2004 Dec 09
3
PostgreSQL user database
Hi,
I am using postgresql for my password and user databases. The problem
is, that the information needed in the user database is held in more
than one table. But it seems to me that dovecot expects to get all the
information for mailbox, uid, gid and home in _one_ query. Is there a
way to get around this? Maybe even getting some of this information by
another way than pgsql (this is more a
2006 Jul 31
5
PostgreSQL
Hi @ all
Does anyone has some experience with PostgreSQL and RoR? Does it gives
any disadvantages or problems with PostgreSQL? I have a webapplication,
that manage (read/write) many records (no. 200''000 records) and I search
a ideal database. Actually, I have two options: - MySQL / - PostgreSQL
And now, I would like to ascertain a good solution...
Thx, ribit
--
Posted via
2006 Mar 24
3
Changing sidebar in layout per controller
I am currently using 2 layouts in my site. One is for the admin area. I
am trying to get content in my sidebar to change depending upon the
current controller.
Example:
Within admin I have a users controller and a articles controller. When
in the users view I want the sidebar to display options (like add user
delete user etc).
What is the best actionview way to do this. I don''t
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
2006 Apr 09
5
RPM for postgresql 8-* for CentOS4?
Hi All,
is there an RPM for 4-1 for postgresql? I did a yum, and the latest is
only 7-4
Installing:
postgresql-server i386 7.4.8-1.RHEL4.1 base 3.0 M
and I need at least 8-*
Any ideas where to find an RPM for CentOS4-1?
Cheers.
Mark Sargent.
2006 Feb 15
2
migrations still
I think I am pissing into the wind to make migrations work at this
point.
Looking at
http://wiki.rubyonrails.org/rails/pages/UnderstandingMigrations
it appears that the problem that I am having is that postgresql can''t do
the drop_table part because of the foreign_key keys (constraints) which
requires ''cascade'' as an option to drop some of the tables that have
other
2008 Apr 17
3
php5 and postgresql 8.2/8.3
Hi.
I have installed php5 with support for postgresql (php5-pgsql). If I
install postgresql-client ver. 8.2.7 or 8.3.x apache (httpd)
core-dumps. If I install postgresql-client 8.1.11 or 8.2.6 apache does
not core-dump.
This is the output (backtrace) from gdb:
(gdb) bt
#0 0x000000080651c340 in ?? ()
#1 0x000000080094ebd5 in puts () from /lib/libc.so.7
#2 0x000000080094f1ee in gethostbyname
2005 Jan 13
2
R, postgresql, windows & bsd
I usually work with R on a windows querying data through RODBC from a postgresql
db on a freebsd machine on my offcie lan.
Now I have the chance to use R also on a linux gentoo client box and to
connect to the same db.
I know that I can install the unixodbc stuff and stick to RODBC, BUT my
question is:
Is there any more 'linuxish' way of querying a postgresql server from a
client?
2006 Apr 27
1
PHP 5.0.4 and PostgreSQL
Hello list.
Does anybody of you use PHP 5.0.4 from "CentOS plus" repo and
PostgreSQL 8.1.x from www.postgresql.org (rpms for RHLE 4 AS)?
(php-pgsql.rpm I have installed)
On my machine PHP don't connect to PostgreSQL. Anybody of you set it up?
On the other server I use PHP and PostgreSQL included into CentOS 4.x
and it works fine.
Regards.
--
2006 May 19
4
Fast update of a lot of records in a database?
We have a PostgreSQL table with about 400000 records in it. Using
either RODBC or RdbiPgSQL, what is the fastest way to update one (or a
few) column(s) in a large collection of records? Currently we're
sending sql like
BEGIN
UPDATE table SET col1=value WHERE id=id
(repeated thousands of times for different ids)
COMMIT
and this takes hours to complete. Surely there must be a quicker
2006 Jul 05
1
ActiveRecord / PostgreSQL Performance Issue
I''m currently using ruby-postgres (the compiled interface to
PostgreSQL), and I''m seeing a huge performance hit with larger :binary
fields in ActiveRecord subclasses owing, it appears, to the use of the
bytea field type and the fact that using that datatype necessitates an
in-memory "unescape" conversion. The best I can tell from looking at the
Postgres Active
2006 Feb 11
16
Why does''nt rails pick up more metadata from a mysql schema?
Hi,
when I define a db column to be non-nullable or of length 20 or as
numeric, I would expect rails to validate that, but that doesn''t seem
to be the case.
Any idea why that is? The metadata is accessible, at least in the mysql case.
I am using rails 1.0 with mysql 5.
Cheers,
Mariano