0
votes
1answer
489 views

Execute triggers function of another schema on the actual chema

my problem is easy to explain with an example: I have a 'common' schema (the public one?) where I store common data between a clustered application. For every instance of my application, I have a ...
0
votes
1answer
17 views

Postgres: Get the Complement of Distinct Entries

Currently I can get distinct entries from a table like this: SELECT DISTINCT ON (abc.entry) abc.* FROM table abc JOIN table1 def ON abc.entry = def.entry WHERE def.created >= 'some_date' AND ...
0
votes
1answer
34 views

A table with infinite rows?

I have a table posts: Column | Type | Modifiers ...
0
votes
1answer
44 views

Postgres Version

I have been asked to develop my new application with Postgres 10.0. Before this, I have been developing applications with MsSql and was quite easy even. I searched for the Version 10.0 but didn't find ...
0
votes
1answer
21 views

how to fix postgresql server automatic reboots [closed]

On some days PostgreSql server starts to reboot itself periodically. Log file is below. It contains found orphan temp table records and after that reboot is performed. Application is accessed by ...
3
votes
1answer
426 views

Returning a nested composite type from a PL/pgSQL function

I'm trying to return nested data of this format from PostgreSQL into PHP associative arrays. [ 'person_id': 1, 'name': 'My Name', 'roles': [ [ 'role_id': 1, 'role_name': 'Name' ], [ ...
1
vote
1answer
20 views

Function returns “query has no destination for result data”

I'm trying to create a function that will effectively function as an UPSERT and return either 0 for a successful UPDATE or the id of the new record for a successful INSERT. While the function will ...
1
vote
3answers
23 views

Find values not present in supplied list postgres

I am trying to find a query that will tell me the values that are not in my database. Eg: select seqID, segment from flu where seqID IN (1,2,3,4,5,6,7,8,9). Now if my database doesn't have ...
0
votes
1answer
25 views

How do I re-cast a Postgres column from Integer to Decimal?

I'd like to alter a column to convert from integer to decimal, setting all integer values to <value>.0. How do I do this?
0
votes
0answers
16 views

Multiple Relations on the same model

i'm having a problem retrieving related data of my model ProductsPproduct when i search with contain. My table is basically a mapping between ordered products and produced products for example ...
-2
votes
1answer
11 views

postgres syntax error in sql

select * from ( select max(h.updated_datetime) as max, min(h.updated_datetime) as min from report r, report_history h, procedure_runtime_information PRI, study S where ...
0
votes
1answer
24 views

Connection refused (PGError) (postgresql and rails)

I keep getting this error when i try to run my localhost using "$rails s": (Mac OSX 10.8.3) (ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]) (Rails 3.2.11) (psql (PostgreSQL) ...
-1
votes
1answer
21 views

how to find the latest revisions updated datetime and oldest revisions datetime in postgres with procedure_fk filter in postgresql [closed]

These are my tables i should find the latest revisions updated datetime and oldest revisions datetime in postgres with procedure_fk filter can any one help me thanks in advance CREATE TABLE ...
0
votes
1answer
23 views

postgres sql 9.2 how to find the last revisions updated value - the first revisions updated value of the report

CREATE TABLE "report_history" ( "pk" SERIAL PRIMARY KEY, "revision" BIGINT, "report_fk" BIGINT, "old_status_fk" BIGINT, "updatedby_fk" BIGINT, "updated_datetime" TIMESTAMP, "file_path" TEXT, ...
0
votes
0answers
17 views

Postgres connection access denied on IPv6 address [migrated]

Installed Postgres 9.1 x64 on Windows, set up a listen address, but when connecting with pgAdmin I get the following error. Not sure why postgres is seeing my IPv6 address and not my regular IP ...

1 2 3 4 5 31
15 30 50 per page