Displaying 20 results from an estimated 30 matches for "pgconn".
2006 Jan 16
0
PGconn class doesn''t recognize all the function export from postgres.so
Hi,
I''m trying to write a new postgresql adapter which
interited the old postgres adapter and I try to use
the PGconn class, But I find out I can''t access to
some of the exported functions in postgres.so (I''m
using LINUX) In fact, only the methode export with
rb_define_singleton_method can be used, only function
s exported with rb_define_method, the PGconn ruby
class doesn''t recognise it...
2006 Nov 24
7
Anyone know whats going on with PostgreSQL async_exec errors?
...what''s going on with ActiveRecord Edge and 1.2RC1 unit
tests. I get 13 failures from the "async_exec" method call. ie:
test_callback_rollback_in_save(ConcurrentTransactionTest):
ActiveRecord::StatementInvalid: NoMethodError: undefined method
`async_exec'' for #<PGconn:0xb75a8754>: SET client_min_messages TO
''warning''
Is this a known failure that someone in core is working on or is this
functionality that needs to be fixed/implemented?
Zach
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla...
2010 Jun 30
0
I have problem ....PostgreSQLAdapter::PGconn
I have a problem when i am creating a rails project using postgresql...
uninitialized constant
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn
I have already installed gem postgres-pr. but not start..
I using rails version 2.3.5
Ruby 1.8.7
PostgresSQL 1.10.2.
Please help me thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou...
2006 May 11
12
Verifying Good Setup of RoR + PostgreSQL
I''ve been reading the RoR tutorials and wiki help stuff, but I''m stuck. :(
I''ve got RoR installed properly and get the "Welcome aboard! You''re
riding the rails." I have an "article" controller, "article" model, and
both an "article" and "articles" views (one is a remnant, I think, and
no longer needed) (the
2007 Apr 18
1
Postgres-pr interface not found
I''ve installed the postgres-pr gem, and it is found using gem list
v0.4.0.
In my active record source, inside the postgresql_adapter.rb file, I''ve
changed line 7 from:
require_library_or_gem ''postgres'' unless
self.class.const_defined?(:PGconn)
to:
require_library_or_gem ''postgres-pr'' unless
self.class.const_defined?(:PGconn)
...to try and force it to use the postgres-pr interface, but I get the
following error when loading a page:
no such file to load -- postgres-pr
Why can''t it find that gem?
OSX 10.4.X -...
2010 May 18
0
Active record is not releaed used memory
I have tried small ruby program like
require ''rubygems''
require ''postgres''
db = PGconn.connect(''localhost'', 5432, '''', '''', ''prdjnj'',''postgres'',
''postgres'')
res=db.exec("select * from users limit 300000")
res.clear
puts "After clear result object"
a=1
while a!...
2006 Mar 05
6
Which postgresql adapter to use for rails core? How about production?
I wanted to fix some things up in the trunk, so I set up the databases
and ran the unit tests. A bunch fail for postgres, and even more
error out. I know of two postgresql adapters: postgres-pr and
ruby-postgres. Strangely, they each fail different tests. So if I
want to fix things up, which one should I be using? For that matter,
which adapter should I be using for production? Finding out
2006 Jan 13
1
How to disconnect to a database????
....save # should have raised exception or error
here
end
end
####################################################################################
the output of index
@connected1:
#<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x2aaaac138930
@runtime=0.0189187526702881,
@connection=#<PGconn:0x2aaaac138980>,
@logger=#<Logger:0x2aaaac2e7fd8
@default_formatter=#<Logger::Formatter:0x2aaaac2e7dd0
@datetime_format=nil>, @progname=nil,
@logdev=#<Logger::LogDevice:0x2aaaac2e7ce0
@shift_size=1048576, @shift_age=0,
@filename="./log/development.log",
@mutex=#<Logger::...
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
...those questions!!!!!
Question A- How rails disconnect the connection?
As we can see in the source code :
Call stack for postgresql
1- any controller
2- connectionspecification.establish_connection
3- ActiveRecord::base.postgresql_connection(config)
4- ConnectionAdapters::PostgreSQLAdapter.new(
PGconn.connect(), logger )
5- connection_specification.establish_connection
@@defined_connections[self] = spec
The connection is made while Rails calls
PGconn.connect(), then the connectionstored in
@connection of the adapter class. while a request is
send to the adapter,the adapter will sends the reque...
2005 Dec 21
1
Escape bytea binary data in postgres SQL
Hi!
I want to escape binary data correctly either manually or using some
pre-defined function that does this for me!
I have found on the web: PGconn.escape_bytea but I only get "undefined
method". Any ideas, what is the correct way of doing this my self?
I''m using Rails (WEBrick) under Windows XP with postgre-pr 0.4.0
I have tried:
s_buffer = s_buffer.gsub(/['']/, ''\\047'')
s_buffer = s_buffer.gsu...
2007 Mar 05
3
postgres barfage revisted
...problem described here:
http://rubyforge.org/pipermail/backgroundrb-devel/2006-August/000299.html
wherein the native Ruby adaptor for Postgres causes Backgroundrb to
crap out with messages like this:
ActiveRecord::StatementInvalid: NoMethodError: undefined method
`async_query'' for #<PGconn:0x22ed648>:
The author''s suggested solutions were to either use the compiled
ruby-postgres, or set ActiveRecord::Base.allow_concurrency to false in
a start script.
Well, the first option seems tricky to me; I haven''t succeeded in
getting that compiled for Mac OS X yet (grant...
2004 Oct 05
1
Cannot compile Meetme2
...r/include/asterisk/lock.h:300: error: (Each undeclared identifier is
reported only once
/usr/include/asterisk/lock.h:300: error: for each function it appears in.)
app_meetme2.c:31:22: libpq-fe.h: No such file or directory
app_meetme2.c: In function `launch_query':
app_meetme2.c:139: error: `PGconn' undeclared (first use in this function)
app_meetme2.c:139: error: `conn' undeclared (first use in this function)
app_meetme2.c:140: error: `PGresult' undeclared (first use in this function)
app_meetme2.c:140: error: `res' undeclared (first use in this function)
app_meetme2.c:15...
2006 Dec 04
7
I need help to connect Postgres and Ruby on Rails Please.
Hello to everyone, I have a problem that is giving me a headache, and
trying to do a project in Ruby on Rails and I need to connect with a
Data Base that is en Postgres, the truth is that I didn’t think that it
was so hard to connect a DB with postgres because I was working with
Msyql and everything was easy. This are the thinks that I have install
in my computer.
1. Debian GNU/Linux, kernel
2010 Mar 31
1
[PATCH] Upgrading the server to work with Rails 2.3.4.
...son_time_format = true
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
# if you're including raw json in an HTML page.
-ActiveSupport.escape_html_entities_in_json = false
\ No newline at end of file
+ActiveSupport.escape_html_entities_in_json = false
+
+def PGconn.quote_ident(name)
+ %("#{name}")
+end
--
1.6.6.1
2006 Mar 23
4
Postgresql connection problems
.../activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require''
from script/generate:3
--------------error--------------
running interactively using irb I have no problems connecting and
talking to the db.
irb(main):018:0> require "postgres"
=> true
conn=PGconn.connect("testpgserver",5432,"","","test_test","testuser","resutest")
=> #<PGconn:0x2aaaab567ae8>
Please help!
2006 Apr 21
4
Bus error in ./script/console with postgres (ext. library)
...n
/opt/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.2.0, the connection
adapter falls back on postgres-pr and everything works fine.
Oddly, the extension library works fine through irb:
--------
% irb
irb(main):001:0> require ''postgres''
=> true
irb(main):002:0> conn = PGconn.connect("localhost", 8000, "", "",
"Site_development", "postgres")
=> #<PGconn:0x5b0b8>
irb(main):003:0> conn.db
=> "Site_development"
irb(main):004:0> res = conn.exec("select count(*) from content")
LOG: dura...
2004 Jun 08
1
Meetme2
...-fPIC -DUSEMYSQLVM -c -o app_meetme2.o app_meetme2.c
app_meetme2.c:31:22: libpq-fe.h: No such file or directory
app_meetme2.c:32:19: mysql.h: No such file or directory
app_meetme2.c:36:26: linux/zaptel.h: No such file or directory
app_meetme2.c: In function `launch_query':
app_meetme2.c:139: `PGconn' undeclared (first use in this function)
app_meetme2.c:139: (Each undeclared identifier is reported only once
app_meetme2.c:139: for each function it appears in.)
app_meetme2.c:139: `conn' undeclared (first use in this function)
app_meetme2.c:140: `PGresult' undeclared (first use in thi...
2005 Mar 05
2
cant compile app_meetme2
..._meetme2.c
app_meetme2.so: app_meetme2.o
$(CC) $(SOLINK) -o $@ $< -lpq -I/usr/local/include/mysql
-L/usr/local/li
b/mysql -lmysqlclient
# $(CC) $(SOLINK) -o $@ $< -lgdbm
app_meetme2.o app_meetme2.c
app_meetme2.c: In function `launch_query':
app_meetme2.c:138: error: `PGconn' undeclared (first use in this function)
app_meetme2.c:138: error: (Each undeclared identifier is reported only once
app_meetme2.c:138: error: for each function it appears in.)
app_meetme2.c:138: error: `conn' undeclared (first use in this function)
app_meetme2.c:139: error: `PGresult'...
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...transaction_query *qry,
+ struct multi_pgsql_transaction_context *x_ctx)
+{
+ init_transaction_query(&qry->super,
+ &sync_transaction_query_vtable, x_ctx);
+}
+
+/** pgc (connection) code */
+struct multi_pgsql_pgc {
+ struct multi_pgsql_pgc *p;
+
+ char *connect_string;
+ PGconn *pgc;
+ PGresult *pgr;
+ struct multi_pgsql_db *pgdb;
+ struct multi_pgsql_query *qry;
+ struct io *io;
+ struct timeout *timeout;
+};
+
+/*** misc */
+static void start_pgc_connect(struct multi_pgsql_pgc *);
+
+static void init_pgc(struct multi_pgsql_pgc *pgc,
+ struct multi_pgsql_db *pgdb,...
2004 Jun 23
0
UPDATE Patch for postgres enabled app_voicemail.c
...tic int append_mailbox(char *, char *, char *);
+
#ifndef USESQLVM
static inline int sql_init(void) { return 0; }
static inline void sql_close(void) { }
+ static void sql_append_mailboxes(void);
#endif
#include <pthread.h>
***************
*** 237,250 ****
#ifdef USEPOSTGRESVM
! PGconn *dbhandler;
char dboption[256];
ast_mutex_t postgreslock;
static int sql_init(void)
{
ast_verbose( VERBOSE_PREFIX_3 "Logging into postgres database: %s\n",
dboption);
! /* fprintf(stderr,"Logging into postgres database: %s\n", dboption); */
dbhandler=PQconnectdb(db...