I would like to migrate a SQL Server 2008 database to Postgres.
Is there a painless way to do this? are there any tools that will scan through the schema and stored procedures to flag compatibility problems?
...
How do data frameworks such as Linq 2 SQL, ADO.Net Data Entities and DataSets relate to the "Model" as defined by .Net MVC.
The reason I ask is I'm trying to learn the ins and outs of the .Net framework without relying on many of the tools that make it easy and hide the workings from you.
The "model" I'm building in my exploratory app ...
Hi, all! I have Postgresql and query
SELECT
complex_expression()
FROM
t
WHERE
complex_expression() != '';
Is there a way to write complex_expression() only once in query and then refer to it? Thanx in advance
...
I am used to Oracle and to create a dblink in my schema and then access to a remote database like this : mytable@myremotedb, is there anyway do to the same with PostgreSQL ?
Right now I am using dblink like this :
SELECT logindate FROM dblink('host=dev.toto.com
user=toto
pass...
I know there are a lot of other SO entries that seem like this one, but I haven't found one that actually answers my question so hopefully one of you can either answer it or point me to another SO question that is related.
Basically, I have the following query that returns Venues that have any CheckIns that contain the searched Keyword ...
How to execute funcion named Test1 that is stored in PostgreSQL from VBA code?
For example. We have function definition as follow:
CREATE OR REPLACE FUNCTION "public"."Test1" (
)
RETURNS bit AS
$body$
BEGIN
INSERT INTO test ("name") VALUES ('1');
RETURN 1;
END;
$body$
LANGUAGE 'plpgsql'
VOLATILE
CALLED ON NULL INPUT
SECURITY INVOK...
Here, I have probleming in trim the value in postgresql. Please have a look. Ruby code ::
if(this.modelName=="ClientOffice")
{ this.params="model_name="+this.modelName+"&action_name="+this.actionName+"&
find_condition=btrim(clients_corporate_billings.id,' ') %3D
btrim('"+validString('populateValue0','text')+"',' ')
& ob...
I just created a couple of queries that bring the same data but in a different. the first one uses a sub query and the second one uses a self join strategy. checking the documentation, i found the ANALYZE and EXPLAIN commands, Now i'm trying to understand which query is better. this is the result of EXPLAIN ANALYZE for each query. Hope s...
So we have a production database that is 32GB on a machine with 16GB of RAM. Thanks to caching this is usually not a problem at all. But whenever I start a pg_dump of the database, queries from the app servers start queueing up, and after a few minutes the queue runs away and our app grinds to a halt.
I'll be the first to acknowledge th...
I am trying to write a query in Postgresql that pulls a set of ordered data and filters it by a distinct field. I also need to pull several other fields from the same table row, but they need to be left out of the distinct evaluation. example:
SELECT DISTINCT(user_id) user_id,
created_at
FROM creations
ORDER BY crea...
Our team is working on a Postgresql database with lots of tables and views, without any referential constraints. The project is undocumented and there appears to be a great number of unused/temporary/duplicate tables/views dirtying the schema.
We need to discover what database objects have real value and are actually used and accessed.
...
Hi,
I am investigating how the http://code.google.com/p/django-fts/ application works. I am trying to setup psql FTS to work with the application, but can't understand how to create index correctly.
Don't understand how to create the GIN index as it was specified in doc.
My model is following:
class Product(fts.SearchableModel):
...
Hai, I`m Newbie in Fluent Nhibernate..
I have postgreSql Database and what i want is generated id with auto increment..
i have no see feature auto increment in Postgres and i was understand that for use auto increment in postgreSql i must create sequence..
there is other way beside sequence?
if create sequence is the only way, can You ...
Hi, We are currently deploying some applications on a glassfish 3.0.1 using a postgres database through postgresql-9.0-801.jdbc4.jar
Our actual configuration regarding the connexion pool is :
Idle Timeout : 120 seconds
Max Wait Time : 60000 millisecondes
Initial and Mimimum Pool Size : 1
Maximum Pool Size : 1
Pool Resize Quantity : 1 ...
Assume this simple SQL query:
INSERT INTO table (col1,col2) VALUES (val1,val2),(val3,val4),(val5,val6);
Lets say val3 is invalid value for col1. This would cause psql to abort whole INSERT command - it would not insert (val1,val2) nor (val5,val6) either.
Is it possible to make postgresql ignore this error so it does not insert (val3...
Everything's in the title.
I am Looping on a cursor and would like to have the
EXIT WHEN curs%NOTFOUND
when there is no more row, what is the equivalent of %NOTFOUND under PostgreSQL ?
Edit
Or the other cursors attributes %ISOPEN, %EMPTY, etc...
...
Hi,
I have a huge partitioned table stored at a PostgreSQL table. Each child table has an index and a check constraint on its id, e.g. (irrelevant deatils removed for clarity):
Master table: points
Column | Type | Modifiers
---------------+-----------------------------+----------------------...
Hi,
Is there a way to get the hash code of a row in postgresql?
I need to export some data only if there is some changes in the data after the last export, the last exported data rows can be stored in a table, the when the again I need to export the data I can get the hash values of all the data and export only those rows who has a d...
I keep looking for this answer online but I cannot find it.
I am trying to pass one record over a PL/pgSQL function. I tried it in two ways.
Fist way :
CREATE OR REPLACE FUNCTION translateToReadableDate(mRecord dim_date%ROWTYPE) RETURNS void AS $$
That is the ouput :
psql:requestExample.sql:21: ERROR: syntax error at or near "%"
L...
Hello.
I have a Web Application which is based on MapServer, which uses PostGIS as underlying database extension. Now I want to have a dedicated database role which is used for MapServer, cause I don't want to access the database via the postgres superuser. This role should only have SELECT permission on public tables (which is easy to...