PostgreSQL is an open-source, object-relational database management system (ORDBMS) available for many platforms including Linux, UNIX, MS Windows and Mac OS X. Please mention your PostgreSQL version when asking questions.

learn more… | top users | synonyms (3)

0
votes
0answers
8 views

Rails unable to reset development database

I tried to drop and reset my database in development with: rake db:drop db:create db:migrate and it didn't work for some reason. Now when I try to run that command I get: FATAL: database ...
0
votes
1answer
10 views

PostgreSQL: replace string with datetime

I have a varying character field (datestring) with a timestamp and I want to convert it to timestamp type. I can successfully create a new timestamp column (see below) and populate this column with a ...
0
votes
0answers
4 views

Postgres ODBC Drive scripted Install

I am trying to script an install for the Postgres ODBC Driver as part of my application's installer. PG gives a great msi but I don't want it to pop up as part of my install. All they say about using ...
0
votes
1answer
12 views

Compare start and end dates across multiple rows

I have a table of subscriptions for contacts. A contact can have multiple subscriptions: CREATE TABLE contact ( id INTEGER NOT NULL, name TEXT, PRIMARY KEY (id) ); CREATE TABLE ...
0
votes
1answer
7 views

Can't make PostgreSQl instance

i am user postgresql 9.1 When i type the fallowing : <?php new PostgreSQL ('localhost','5432','postgres','postgres','12345'); i get the error ?> Fatal error: Class 'PostgreSQL' not ...
0
votes
0answers
6 views

postgresql trigger: disable auto commit and set isolation level

i'm writing a trigger on database INSTEAD OF INSERT ON a table, that made some operation, then insert data into different related tables. Now i need to disable autocommit and set a different isolation ...
0
votes
3answers
43 views

MySQL to PostgreSQL query rewrite using “IN”?

I'm transferring over some queries from MySQL to PostgreSQL and I'm stumped on how to rewrite the following query to work in PostgreSQL: SUM(phoneid IN (1, 2, 6, 8)) AS completedcalls I originally ...
0
votes
2answers
16 views

Where is psql client history kept? (~/.psql_history non-existant!)

A password is visible in my psql prompt (by pushing up arrow to view previous inputted commands). So I would like to delete that entry from the psql client. Other resources(1, 2) claim that psql ...
0
votes
0answers
27 views

RuntimeError: ERROR Mrelation “tablename” does not exist

Rails - 2.3.8 Database - Postgres(9.2) Active record query is not able to generate tablename in double quotes ie # this ran fine Table.find_by_sql('Select * from "Table" Limit 1') ...
0
votes
1answer
14 views

how to prefix a string before sequence generated by postgresql?

This is a sequence CREATE SEQUENCE technician_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; It generates 1234 I need the sequence as AAA1AAA2AAA3AAA4 Is it possible? I am ...
2
votes
1answer
24 views

Postgres PL/pgSQL recursive calculation

Maybe some one could point me to the right direction. I have faced the problem writing PL/pgSQL sentence where I need to calculate "calculation" column which depends on previous month value. ...
0
votes
2answers
11 views

Filter nil and empty values from an array in rails 3.2

I have a table called Materials and I have created a search form. In the form I want to have select boxes containing the names of the search options. So for example, if you want to search by subject, ...
0
votes
0answers
14 views

Postgresql with postGIS and entity framework, CHECK constraint issue

I have a postgresql database with postGIS and I'm using entity framework with dotconnect for postgresql 6.7. I'm running the following code: using (testModel.testEntities ctx = new ...
1
vote
1answer
23 views

get the number of updated row

I am trying to make a plpgsql function that does a update and then return the number of updated rows. I found this: GET DIAGNOSTICS updated_row_count = ROW_COUNT; It works just fine. However I ...
1
vote
0answers
6 views

Set GeoServer to access a Postgresql database, Simple or Snapshot schema, populated by Osmosis

I have a postgresql database which I keep updated using Osmosis. Osmosis can write to two different database schemas, named Simple and Snapshot. There are not that much different from the database ...

1 2 3 4 5 1237
15 30 50 per page