Most voted "psql" questions
13 questions
Sort by count of
-
2
votes5
answers14274
viewspsql command at prompt. (postgresql database)
Good morning, everyone, I’m trying to make a script with extension. bat to make automatic update in the bank,. I am doing as follows to access my bank through windows pronpt. psql -U bank user -w…
-
1
votes1
answer81
viewsC# - Check if dates are missing in the selected period
I have the following SQL SELECT dt_finished::date AS "DataFinalizacao", count(DISTINCT tba.id_batches) AS "Quantidade Total" FROM tb_batches AS tba INNER JOIN tb_routes tro ON (tro.fk_id_products =…
-
1
votes1
answer103
viewsHow to audit records by saving changes in JSON
I’m using a function to audit records at Insert, update, delete events for a Postgres 9.6. I got the script on Git - Audit-Trigger The script has been implemented and is working perfectly, but one…
-
1
votes0
answers89
viewsrake:db setup error (failed to connect to postgresql) in the Ubuntu subsystem for Windows
Hello! I am using the Ubuntu subsystem (18.04) in windows com ruby on Rails (ruby version 2.5.1 and Rails 5.2.2) and with Postgresql in version 10. I surrounded a rake db:setup at the root of my…
-
0
votes1
answer93
viewsPgbouncer does not connect via service in windows
I installed pgbouncer as a service in windows 10 using: pgbouncer.exe --regservice <pgbouncer.ini> Placing the ini path and from the folder where the pgbouncer exe is. The service is installed…
-
0
votes1
answer605
viewsPostgresql regular expressions
Come on, guys, I need some help I’m trying to make a Rigger in postgresql that checks whether the format of a new data to be inserted into a table is in a certain format, in this case the phone…
-
0
votes1
answer341
viewsCatch table name with Trigger/Function in Postgres
I am implementing a simple replication form of two tables or more. I have the table replication which has the table name to be replicated and id. To feed the table replication I have a Rigger in…
-
0
votes2
answers857
viewsPostgresql, Variables for psql functions
I am trying to create a Trigger Function to remove a schema created in the database based on an idproj attribute from the geo.projects table listed below: CREATE TABLE geo.projetos ( idproj serial…
-
0
votes1
answer1024
viewsScript for postgres bank
I created this script to clear the bank table and reset id's. It works, but not in the right way It runs and authenticates on psql. but instead of running the commands sql it only opens the psql. If…
-
0
votes1
answer43
viewsSelect only returns result in terminal
I’m having trouble understanding why the code below only returns result when executed in the terminal. I intend to return hash of the last id entered in the database connection =…
-
0
votes0
answers52
viewsAlternatives for backslashed commands in Postgresql
I’m learning to use the Postgresql instead of Mysql and Sqlserver, but I’m still lost with some basic commands. So far, the only one I’ve been able to get acquainted with is this: listar os bancos…
-
-1
votes1
answer58
viewsCommand c connect asks password I did not create [Postgres]
Hi, I created the table controle_compras and it all worked out. I inserted items as indicated in the class, but only as an exercise, I started to create another table only to train the commands. But…
-
-2
votes0
answers15
viewsQuestion about Postgresql 9.5.25 with pgAdmin 3 that comes installed along with it: how to use command line instead of graphical interface?
Use the Postgresql 9.5.25 and along with it comes the pgAdmin 3 installed. However, I don’t want to use the graphical interface of the database. So I go in the same folder as the pgAdmin3.exe is…