similar to: ActiveRecord / PostgreSQL Performance Issue

Displaying 20 results from an estimated 3000 matches similar to: "ActiveRecord / PostgreSQL Performance Issue"

2006 Oct 30
2
pg_escape_bytea / pg_unescape_bytea (php) alternative in Rails?
Is there a built-in function that handles the problem of bitstreams in postgresql? The problem occurs when the stream contains for example the " character. Postgres will think that the string has ended with that character. Is there a function that changes all such characters into "\[ASCII-number]"? And the other way around when getting the stream back from the database? References:
2006 Jul 05
5
Help with migrations and create
After creating a table in a create table migration, I''m then attempting to populate a couple of rows of data in the table using the create method. The first row gets inserted into the database, but any further calls generate a select against the database, but no insert. Am I doing something wrong, or is it inappropriate to create more than a single row of data in a table using
2006 Apr 11
5
Multiple "has" in ActiveRecord
Please excuse a newbie question, but I couldn''t find anything by searching the archives. What I want to know is how to have multiple references to the same class/table within a class. For example, let''s say I have a table called People: create table people ( id serial8 primary key ,name); which just holds a list of the people in the database. Then I have another
2006 Jan 18
1
Rails and PostgreSQL bytea
Hi! I''m trying to insert binary data into a PostgreSQL database where the field is of type ''bytea''. This works fine if a do Base64 encoding but I just want to do character escaping. How do I do this????. What I get is this: ActiveRecord::StatementInvalid in Init_test#save_file ArgumentError: Invalid Ruby/cstring: INSERT INTO
2006 Jul 05
6
upload file in a database or a server?
Hi, I would like some suggestions. I''m wondering if it''s better to upload a file directly into a database or to put the file into the server and keep the path in the database? Thanks, Eric -- Posted via http://www.ruby-forum.com/.
2011 Sep 12
0
Migrate column from text to binary (PostgreSQL)
Hello, So I''ve realized one of the columns in a table has to be binary instead of text. However, a straightforward change_column :my_table, :my_column, :binary fails under PostgreSQL (9.x series) The error message being: PGError: ERROR: column "my_column" cannot be cast to type bytea : ALTER TABLE "my_table" ALTER COLUMN "my_column" TYPE bytea Now
2009 Mar 31
1
external equiv to R_serialize()?
I'm trying to efficiently allow conversion of R objects to PostgreSQL bytea (raw binary) datatype within PL/R for persistent storage in Postgres tables. I have found R_serialize() which looks like what I need, -- e.g. R_serialize(object, NULL, FALSE, NULL) -- except that it is marked attribute_hidden. Is there some other externally available interface that I can use? Thanks, Joe
2006 Aug 07
1
DirHandler in surplus slashing / unrequited unescaping
im using Mongrels to serve up /usr/portage/packages for other gentoo boxen. since i guess im the guinea pig with the DirHandler, ran into a couple issues: first, the client showed no files in the remote binhost, turns out the DirHandler was adding a trailing "/" to every filename, presumably making the client think they were directories, not files. attached is a patch which fixes this
2016 Oct 17
2
Dict proxy client returning empty string instead of multiline string
Hi! Looking at the code, I think the bug is that it just copies pointer to the value, it should, instead, duplicate the value to some memory region. Can you see if this following patch fixes it? Aki > On October 17, 2016 at 4:14 PM Pierre Jaury <pierre at jaury.eu> wrote: > > > Okay, it seems to me that the bug is due to "t_str_tabunescape" using > the unsafe
2006 Nov 22
1
to_absolute_uri typo in 0.6.3?
I just started using Mechanize, and started using Ruby about thirty seconds before that, but one of the sites I''m scraping does a redirect on form submission to a badly-formed relative URL: index.cfm?action=bing&bang=boom=1|a=|b=|c= (etc.) Interestingly, Mechanize 0.6.2 handled this OK, but in 0.6.3 this causes a URI::InvalidURIError exception from URI.parse() in to_absolute_uri
2016 Oct 17
1
Dict proxy client returning empty string instead of multiline string
While trying to isolate properly and reproduce, I was able to trigger the same bug with the following code: struct dict *dict; char* dict_uri = "proxy::sieve"; char* key = "priv/key"; char* username = "admin at domain.tld"; char* value, error; dict_drivers_register_builtin(); dict_init(dict_uri, DICT_DATA_TYPE_STRING, username,
2009 Mar 27
1
UTF8 postgres args saving issue
Hi, All I have an encountered an issue where the args field is not saved correctly to the database. I encounter an error like this: ActiveRecord::StatementInvalid (RuntimeError: ERROR C22021 M invalid byte sequence for encoding "UTF8": 0xcb3a H This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by
2016 Oct 17
2
Dict proxy client returning empty string instead of multiline string
Oh duh, it used datastack pool. Try again with the attached patch? Please remember to clear the previous one out before trying. Aki > > The trace is missing some symbols, I will debug tomorrow and see where > the call comes from exactly. > > Regards, > > > On 10/17/2016 06:23 PM, Aki Tuomi wrote: > > Hi! > > > > Looking at the code, I think the bug
2013 Nov 08
1
Dict client unescaping sieve script
I've created a dict service that listens on a unix socket and answers queries for sieve scripts (among other things). As I understand it (from the source code at http://hg.dovecot.org/dovecot-2.2/file/tip/src/lib-dict/dict-client.c), the dict client will unescape \001n, \001t, and \0011 to line feeds, tabs, and the \001 character respectively. In my service I am escaping those three
2016 Oct 17
2
Dict proxy client returning empty string instead of multiline string
Hi! This does sound like a bug, we'll have look. Aki On 17.10.2016 01:26, Pierre Jaury wrote: > I dived a little bit further into the rabbit hole, up to the point where > debugging has become unpracticle but I still haven't found the root > cause for sure. > > I read most of the code for "p_strdup" based on datastack memory pools > (which are used for
2014 Oct 31
6
[PATCH 0/3] WIP readline escaping functions
From: Maros Zatko <hacxman@gmail.com> Auxiliary functions for readline to support space character escaping in filenames in future. Escaping function is taken from fish.c (used to be parse_quoted_string) plus its un-escaping counterpart. There are a few tests for both. Maros Zatko (3): fish: rl.{c,h} - escaping functions for readline fish: basic tests for readline escaping autotools:
2006 Jan 31
19
Best Practices: Escaping text on input or output?
In web applications that have user generated content, it is clearly necessary to provide some ability to ''escape'' user generated text to avoid SQL injection, XSS, and other nasty attacks. The existing dogma on this point seems to favor escaping text as it comes out of the database, rather than doing it on the way in. I''m not sure that I understand the logic behind
2023 May 19
1
[libguestfs PATCH 3/3] LUKS-on-LVM inspection test: test /dev/mapper/VG-LV translation
On Fri, May 19, 2023 at 04:08:49PM +0200, Laszlo Ersek wrote: > In the LUKS-on-LVM inspection test, call the "check_filesystems" function > yet another time, now with such "--key" options that exercise the recent > "/dev/mapper/VG-LV" -> "/dev/VG/LV" translation (unescaping) from > libguestfs-common. > > Bugzilla:
2011 May 16
3
Problem with GET args and UTF-8 encoding (output of Rack::Utils.unescape() ?)
Hi folks, Here''s my basic issue, hopefully this is clear. I''m trying to submit some UTF-8 values in my query string, but they are coming out mangled on the other end. It *seems* like the problem is that what Rack::Utils.unescape() pushes out gets converted to UTF-8 somewhere in the chain (using 3.0.7, and Ruby 1.9.2, by the way), and it''s mangling characters which are
2005 Aug 11
7
script.aculo.us V1.5_pre1 released
Heya, I''ve just released script.aculo.us V1.5_pre1. Please give it a try! Important new stuff (since V1.1b1): * Added a main scriptaculous.js file to load in the other libraries transparently. * Fixed a condition where standard a href=xxx links wouldn''t work in autocomplete results. These do now, the onclick event is not cancelled. [thx to Jasper Slits] * Added