Questions tagged as 'postgresql'

0
answers

create a trigger to allow book borrowing only for students who have 'MT'

The teacher asked me to do a trigger in postgresql, but I can not do it if someone can help me, create a trigger to allow a book loan only for students who have 'MT' status, create function language plpgsql at $$ begin     if     insert business...
asked by 06.12.2018 / 22:16
0
answers

Using NLog with PostgreSQL C #

I'm working on an application, and have some registry screens, and I want to add a log routine to the API of these records, type: do not add, update, and error occurrences (if any). The database that is being used is PostgreSQL and here comes...
asked by 27.12.2018 / 21:20
0
answers

Postgresql 10 - Parallel Settings

There are 4 settings to enable parallel and optimizations, but documentation / a> in PostgreSQL does not say anything about values or calculations. My questions are:    1- How to calculate the values of max_parallel_workers ,  ...
asked by 31.10.2018 / 09:56
0
answers

Accessing XML value in PostgreSQL

I need to access the value of the Message tag from the following xml content: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XM...
asked by 20.12.2018 / 17:09
0
answers

Select 2 information from a json

I have the following select to query in the bank the sum of the values of a given day and group by cardBrand . select SUM (amount::numeric)/100, response ->> 'cardBrand' from fatura where duedate::date ='2018-06-15' group by response -...
asked by 31.10.2018 / 17:54
1
answer

Different result in order by com limit

I'm having problems with 3 queries. First a normal select sorted by date: select id from app_order o order by o.date ; // 30558, 30559, 30560, ... Then one that should bring me the last record of the previous query: sel...
asked by 03.10.2018 / 00:02
1
answer

How to do a linear regression in postgresql?

I want to do a simple linear regression directly in the database. I noticed that postgresql already has some statistical functions, which I think are for this purpose ( regr_slope(Y, X) , regr_intercept(Y, X) , regr_count(Y, X)...
asked by 20.09.2018 / 20:08
1
answer

Divide sql results in rows through delimiter

Good afternoon, guys. I have a difficulty to do a select in a postgres DB here. For some reason, the programmer invented creating a field where, if the user enters two notes at the same time, the system writes in the bank only one line for tha...
asked by 25.09.2018 / 18:58
1
answer

DataGridView with DataSet Custom Value

Hello, good morning. I would like to ask you for help on the following situation: I use the PostgreSQL database integrated with Visual Studio Enterprise with the (PostgreSQL Integration) Npgsql package. For those who do not yet know this pa...
asked by 13.09.2018 / 15:58
0
answers

Cross apply in postgres?

I have the following situation CROSS APPLY (select top 1 seq.id_prod, seq.id_emp, seq.localizacao, seq.localizacao_modulo, seq.localizacao_nivel, se...
asked by 19.09.2018 / 13:28