Questions tagged as 'postgresql'

1
answer

Function of postgres executed from java

I have a function in PostgreSQL that takes 6 values, the first one character varying , the next one an integer and the remaining 4 are of type numeric . I call it from Java in the following way: preStmt=con.prepareStatement(...
asked by 25.09.2017 / 22:02
0
answers

Django queryset without models

I need to make queries to the database ( postgresql ) but the tables I want to consult were created by pandas so I do not have a model to refer to, how do I do queries without models?     
asked by 14.09.2017 / 20:22
1
answer

How to make INNER JOIN between a table in SQL SERVER and a linked server?

Well I mean, I have a database in SQL SERVER called SIELAB and another database in PostgreSQL called reservations , I managed to make the connection correctly and I have already managed to execute a SELECT query from a stored procedure...
asked by 17.08.2017 / 04:20
0
answers

Make a SQL query that varies on a table in Python

I want to write the result of several SQL queries that are dependent on a table res[ids] . for i, ids in enumerate(self.res['ids']): print ids cur.execute("""--- hashtag describiendo los grupos de subscrib...
asked by 04.08.2017 / 17:03
1
answer

PostgresSQL add elements

I need to form the json in this way in PostgreSQL. ubi_json json; FOR i IN 0..7 LOOP ubi_json = ubi_json || to_json('valor',i); END LOOP; Error comes out: Error : no existe la función to_json(unknown, integer) I need this:...
asked by 06.08.2017 / 17:41
0
answers

Convert SQL Native to JPQL

I have this query select distinct p.nombre, p.total, p.clie_id from(select cli.nombre as nombre, cli.clie_id, cue.cuen_id as cuenta, count(cue.clie_id) over(partition by cli.clie_id) as total...
asked by 06.08.2017 / 21:59
1
answer

Download .sql file to Postgres heroku

I am implementing a larvel project, this already has a populated database. Now I need to deploy this project in Heroku but I can not make the migration from my .sql file to postgres Heroku. I have tried with the documentation but the single inst...
asked by 26.07.2017 / 18:56
1
answer

Independent database architecture for each client

Objective. I have to develop a project with Django and I want it to have the following characteristic: for each company or client (whether company or not) that uses my system, I want a database to be created independent. Basically what I wa...
asked by 02.07.2017 / 05:47
1
answer

It is possible to effectively use CREATE ROLE and its privileges, GRANT and REVOKE within a function in postgresql (version 9.4))

I have to build two functions to use in the creation of roles and in assigning a role to a group according to its category in postgresql. Here's the code: The first function is to create a user and call my second function that will assign t...
asked by 04.07.2017 / 00:20
1
answer

fe_sendauth: no password supplied Ruby On Rails 5

I'm going to upload a Rails project to Heroku so the project is in Postgres but when I try it in development (Not in production) I get this error: PG :: ConnectionBad fe_sendauth: no password supplied In my database file I have it like this:...
asked by 30.06.2017 / 05:34