I am trying to edit a table in Postgresql using JPA in Glassfish using EclipseLink. When I insert an entity, it runs fine. But, when I try to edit or remove the same entity, it fails with the following error. Any idea?
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistenc...
Hi, I am currently doing small pet project web programming stuff using
ruby. I am new to web programming, MVC, ORM and so on, so lots of hurdles here.
Anyway, I have difficulties using sequel as ORM.
I already have a postgres db running
(created without using sequel whatsoever, just used plain postgresql command) but
don't know wher...
I'm trying to push a large database (1.6 GB over 8 tables) to Heroku via db:push and having strange issues.
It keeps failing, at different points in the transfer process, with:
HTTP CODE: 500
Taps Server Error: PGError: ERROR: duplicate key value violates unique constraint "letters_pkey"
letters is a large table (1.3 M records) b...
I need to analyze a few million geocoded records, each of which will have latitude and longitude. These records include data of at least three different types, and I will be trying to see if each set influences the other.
What database is best for the underlying data store for all this data? Here's my desires:
I'm familiar with the DB...
I'm getting this error when I try to view the page:
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
I have the following /WEB-INF/web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<display-name>WSwartzendruber.net</display-name>
<description>Personal Website</description>
<!-- Servlet st...
Does anybody know the magic incantation required to get a Sinatra application that uses DataMapper up and running on Heroku's Bamboo stack? The Bamboo stack doesn't include any pre-installed system gems and no matter what combination of gems I try I keep getting this error:
undefined method `auto_upgrade!' for DataMapper:Module (NoMetho...
Can we do something like
\echo 'Type username to show its properties';
SELECT * FROM mY_users WHERE username = ?;
\echo 'End of script';
in a psql script file ?
The system would wait until we enter something then echo the 'End of script' string.
...
I'm from an Oracle background, and with each release there are plenty of excellent books on using Oracle as a database. I've found several good MySQL books as well, but I have no idea which of the PostgreSQL books or resources is good and up-to-date. With an upcoming 9.0 release, what are your recommendations?
...
Hello,
I am trying to make Doctrine generate SQL from a set of models that I created earlier with a YAML schema. Using the code below which comes from the manual the output should be a set of queries.
<?php
// test.php
require_once('bootstrap.php');
try
{
$models = Doctrine_Core::generateSqlFromModels('models/generated');
ec...
I need to import a csv file that has 10's of thousands of rows into a Postgres database daily. I'm looking into the most efficient way to do that as each line in the csv file can be a new record or an existing one that should be updated if it's there. After many searches, I stumbled upon a solution, which I used:
CREATE OR REPLACE RULE ...
Hello I want to use full-text search using postrgresql but the problem on heroku, i can not think of a way to have custom dictionary using my language (Greek).
on my pc I did
CREATE TEXT SEARCH DICTIONARY greek_ispell (
TEMPLATE = ispell,
DictFile = greek,
AffFile = greek,
StopWords = greek
);
and setup the sharedir using the custom...
I have a column (varchar in mysql and a character varying in postgresql).
I need to apply sum on the column and I need a cast syntax that works for both.
The db structure is old and has both int and varchar values. I can't change that.
...
Hi,
I have the problem that objects were unexpectedly deleted and created a minimal example. I dont't know whether it's a bug or if a made a thinking error.
The models are something like that:
class A(models.Model):
related = models.ForeignKey('C', blank = True, null = True)
class B(models.Model):
title = models.CharField(max...
How to send a table to function as argument?
Need something like that:
CREATE OR REPLACE FUNCTION test(argTable TABLE(
field1 integer,
field1 integer,
etc smallint
))
RETURNS integer AS
$BODY$
...
Is it possible btw?
UPD: I'm going to send a temp table to function so I suppose I need table structure decla...
I've got some linked tables in a Postgres database, as follows:
Table "public.key"
Column | Type | Modifiers
--------+------+-----------
id | text | not null
name | text |
Referenced by:
TABLE "enumeration_value" CONSTRAINT "enumeration_value_key_id_fkey" FOREIGN KEY (key_id) REFERENCES key(id)
Table "public.enumera...
Hi,
I need to restrict the access to a part of the application. In order to access that part, user needs to log in. I have a table in my database called User, with usernames and hashed passwords and a login form that consists of two inputs and a submit. However, I don't know which classes/mathids should I use to log in the user (I assume...
i look the bocument at http://blog.visionsource.org/2010/05/31/installing-php-extensions-on-mac-os-x-under-xampp/
try install the pgsql extend, success build the extend, and copy the pgsql.so to /usr/lib/php/extensions/no-debug-non-zts-20090626
but i get a warning when i tap 'php' conmment in the terminal:
PHP Startup: Invalid library (...
Hi Im running example using hibernate with postgresql 8.4, when i try to add it will dispay following error
org.hibernate.exception.SQLGrammarException: could not insert: [com.claystone.db.OrWorkgroup]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.c...
Aside from removal of some MySQL specific queries, the migration was pretty smooth. The problem now is, that during developement there is a lot more queries to the DB than before.
Started GET "/profiles/data" for 127.0.0.1 at Tue Sep 21 10:26:18 +0200 2010
Processing by ProfilesController#data as JSON
User Load (24.3ms) SELECT "users...
Hi guys. I've been using PostGIS in a long time now but never had to use the LINESTRING geometry ... yet! :)
Here's what I would like to do : I have a table of linestrings (representing streets of a given city, SRID 3395) and I would like to find the nearest linestrings to a given point (GPS position, SRID 4326).
The solution I found ...