I'm checking for existing of a row in in_fmd, and the ISBN I look up can be the ISBN parameter, or another ISBN in a cross-number table that may or may not have a row.
select count(*)
from in_fmd i
where (description='GN')
and ( i.isbn in
(
select bwi_isbn from bw_isbn where orig_isbn = ?
union all
select...
PL/Ruby is a loadable procedural language for Postgres that lets you use Ruby to write user defined functions for the database.
Anyone know of an equivalent way of writing user defined functions for MySQL in Ruby?
...
I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much?
...
Hi
I was hoping to get some advice from the panel.
I have a requirement to develop a .NET-based application whose data requirements are, in the future, likely to exceed the 4 gig limit of SQL 2005 Express Edition.
There may be other customers of the same application in the future witwh a requirement to use a specific DB platform (such...
I've got the following settings in my postgres conf:
log_destination = 'stderr'
redirect_stderr = on
log_directory = '/tmp/psqlog'
log_statement = 'all'
And yet no logs are logged. What am I missing here? There is reference on the internet to a variable called "logging_collector", but when I try and set that, postgres dies on startu...
I'm trying to do a subselect in pgsql aka postgresql and the example I found doesn't work:
SELECT id FROM (SELECT * FROM table);
...
Suppose I create a table in Postgresql with a comment on a column:
create table t1 (
c1 varchar(10)
);
comment on column t1.c1 is 'foo';
Some time later, I decide to add another column:
alter table t1 add column c2 varchar(20);
I want to look up the comment contents of the first column, and associate with the new column:
select...
Hi.
Does anybody know what's going on here:
I run hibernate 3.2.6 against a PostgreSQL 8.3 (installed via fink) database on my Mac OS X. The setup works fine when I use Java 6 and the JDBC 4 driver (postgresql-8.3-603.jdbc4). However, I need this stuff to work with Java 5 and (hence) JDBC 3 (postgresql-8.3-603.jdbc3). When I change the...
Running Mongrel 1.1.5 on Rails 2.1.2 using PostgreSQL 8.3 via ruby-pg 0.7.9 on OS X 10.4 server...
Added restful_authentication and exception_notification, the latter of which appears to be doing me no good when Mongrel simply dies with "Illegal instruction" every time I select /RESOURCE_NAME/new.
Doesn't matter what resource.
In deve...
Or better said: When to use array as a field data type in a table?
Which solution provides better search results?
...
PostgreSQL allows the creation of 'Partial Indexes' which are basically indexes with conditional predicates. http://www.postgresql.org/docs/8.2/static/indexes-partial.html
While testing, I found that they are performing very well for a case where the query is accessing only certain 12 rows in a table with 120k rows.
But before we dep...
How do I ALTER the POSITION of a COLUMN in a Postgresql database? I've tried the following, but I was unsuccessful:
ALTER TABLE person ALTER COLUMN dob POSITION 37;
...
It seems like the classical way to handle transactions with JDBC is to set auto-commit to false. This creates a new transaction, and each call to commit marks the beginning the next transactions.
On multithreading app, I understand that it is common practice to open a new connection for each thread.
I am writing a RMI based multi-client...
Hello there,
I want to automate tests on my web application, and it uses postgresql. Does anyone know how define a restore point on a postgresql database and restore to an earlier state?
I heard something about point in time recovery, but i dont if this is what i need.
Thanks in advance
...
A query working on Postgresql 7.4 but not on Postgresql 8.3 with same database.
Query:
SELECT * FROM login_session WHERE (now()-modified) > timeout;
Get error
ERROR: operator does not exist: interval > integer
LINE 1: ...ELECT * FROM login_session WHERE (now()-modified) > timeout ...
...
Is there a tool which tells you (or gives you a hint) why a particular select statement dose not return any rows given the current data in your database.
eg if you had the following 4 table join
select *
from a, b, c, d
where a.b_id = b.id
and b.c_id = c.id
and c.d_id = d.id
If there were rows which satisfied the conditions a.b_id ...
Hi...
I'm a little bit stuck with a asp.net project that i'm doing! I have got a class that is called from the code behind and many of its function have no return type ie, being void. How does one do exception handling then??? Also, if the function within the class does have a return type of, for instance, a dataset how would one then r...
I am using a query like this on my postgres database,
SELECT TableA.id FROM TableA , TableB WHERE TableA.id = 100;
Each TableA.id is unique (its an autoincrement), I am gettting more than 1 result. Am i missing something in here?
...
Hi there...
I have a question regarding an update function I created...
CREATE OR REPLACE FUNCTION rm_category_update(icompany bpchar, iraw_mat_cat_code bpchar, iraw_mat_cat_desc bpchar)
RETURNS character AS
$BODY$
DECLARE
loc_result CHAR(50);
BEGIN
UPDATE rm_category
SET
raw_mat_cat_code = iraw_mat_cat_code,
r...
A C-program is placing what it considers to be 64-bit unsigned integers into a column in a Postgres database that is typed as int8.
To Postgres, int8 is always 'signed int8' (no such thing to it as 'unsigned int8').
So the Ruby program I have shows numbers retrieved from Postgres in the upper half of that space as negative.
What is the ...