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.
0
votes
0answers
7 views
Notification of Email consumption into some database
I have a notification system which send emails to particular set of people everyday.
I wanted to do some analytics over it like how many of them actually have read/opened the email of a particular ...
0
votes
1answer
17 views
Best way to create variable number of input parameter functions with PostgreSQL
I'm creating a stored procedure (function) in a PostgreSQL DB, which updates a table depending on its input. In order to create a variable number of parameter function, I'm creating an extra input ...
0
votes
1answer
8 views
citusdb: psql commands not working
I am trying for the first time citusdb, and in the download page, they put a getting started guide, so I am following it.
First, I am trying this on my local computer, and with the sample data on the ...
0
votes
2answers
23 views
Updating a field in a table with a number aggregated from other table
I have a log table with web log entries which have a session ID. I also have a session table summarizing sessions from the previous table. So I have to run some update SQL statement but I don't get ...
0
votes
1answer
21 views
select like digits from rows
I have a database of numbers. Four digit numbers to be exact. I want to see if any of them have like numbers in there.
So for instance a row might be 1232. I want to know that a double 2 came out. Is ...
0
votes
1answer
13 views
ISO-8601 format date for PostgreSQL
I have a question about type of data about a Postgres data.
I have string containing an ISO-8601 formatted date/time format (as example:"2013-05-21T15:00:00+0200") and Timezone (as example: ...
0
votes
2answers
15 views
PostgreSQL if else syntax error
i try a query that runs on mssql however does not run postgreSQL...
SQL Query is..
IF EXISTS (SELECT * FROM Kategoriler WHERE KategoriId = 119)
BEGIN
SELECT * FROM Kategoriler
END
...
0
votes
2answers
16 views
Connecting to Heroku Postgres using SSH (Putty)
I'd like to be able to connect to my Heroku postgres (crane) database from my desktop using Putty.
I recently moved from Webfaction to Heroku. On webfaction this was a really simple process (via ...
0
votes
2answers
59 views
Complex Rails Query
I have a model structure as below:
User has many Surveys through ResponseSets(user can attend same survey multiple times there by creating ResponseSets for each attempt).
ResponseSet has many ...
1
vote
1answer
27 views
Use column from first table as condition for joining second table
Suppose I have
products:
folio price quantity
1 100.00 1
1 450.00 2
3 150.00 1
4 600.00 2
terms:(to know how many payment terms depending on the ...
0
votes
1answer
25 views
How do I include a time condition in this sql query
I have a Rails app that uses the custom sql string (with a postgres database) shown below. That string works fine. I'm trying to add a time condition into the query so that I only retrieve records ...
0
votes
0answers
18 views
Optimistic Lock when deleting Play! Framework
My app is based on Play! Framework + PostgreSQL.
I can't get rid out of this optimistic lock exception, happening when I loop on a list of objects retrieved fro the database.
The exception is thrown ...
1
vote
2answers
26 views
How can I tune the PostgreSQL query optimizer when using SQL logical 'OR' and operator 'LIKE'?
How can I tune the PostgreSQL query plan (or the SQL query itself) to make more optimal use of available indexes when the query contains an SQL OR condition that uses the LIKE operator instead of =?
...
0
votes
0answers
10 views
Mybatis and invalid types
I use mybatis 3.2.2, PostgreSQL and get the "Error instantiating class xxx with invalid types or values". The exception is triggered when calling getPluginId(). Here is my configuration:
mapper.xml:
...
-3
votes
4answers
48 views
PHP PDO Undefined Index [duplicate]
I've had a look round on google and a couple of other sites, but I can't figure out why this isn't working.
I'm working on a uni assignment, and run the following code:
$db = connect();
$testname = ...