pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2830

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

Hi everyone.

I have a question about active users.
How can i find to show data of usera dont active in the last 30 days?

Читать полностью…

PostgreSQL

I wrote a big query with multiple join conditions when I use two columns in the select part this query will execute within 3 seconds and return 300000 of records but when adding another 15 columns the same query will take 1.30minutes..how can I reduce the time?

Читать полностью…

PostgreSQL

It must be the same unless you decide to change authentication method at pgpool side (pool_hba.conf)

Читать полностью…

PostgreSQL

This pasword could be the same that i create in by database? So after that i can connect in virtual ip ? With the port 9999??

Читать полностью…

PostgreSQL

Hello😀 somene can help me, i have a cluster with a virtual ip with the port 9999, but all my nodes listen in the port 5432 how can create a user in postgresl just to read and write in some schema. I already created the user called “pruebasintercom” but when I try to conect with the virtual ip on port 9999 , but i got this error failed to authenticate with backend using SCRAM: valid password not found ?? In pgpoo there is a file pool_hba.conf what can i do there?? Maybe there is i have to create the new user from my data base?? Some can guide me please?

Читать полностью…

PostgreSQL

I have a New Client... ncdb
And I SOLELY operate in nctest
When I connect with psql, the prompts get different colors.

Читать полностью…

PostgreSQL

https://momjian.us/main/writings/pgsql/nulls.pdf
helped me a lot to wrap my head around it ;-)

Читать полностью…

PostgreSQL

Hello Guys,

can I know which method I can use in this case.

I've timescaledb and a hypertable in my source. I just needed to replicate and copy all the data in this hypertable to a new exactly same structure table in the same server or the same database, and also any ongoing changes will be replicated as well.

Thanks in advance

Читать полностью…

PostgreSQL

That sounds like you're trying to restore, not back up... Try renaming your broken DB and restore to an empty new one.

Читать полностью…

PostgreSQL

Absolutely stuck with a restoration:
So I backed up my db
And made lots of changes
But missed one dependency case
Now I have to restore the backup and redo all of the changes within hrs
But not able to back it up
There are so many errors ( must be a member, table exists, column exists etc )


-ps backend developers given with DE work, working on pgadmin
Just startedup with data handling so any help is good help

Читать полностью…

PostgreSQL

Did you (hopefully) put a hostssl entry into pg_hba.conf? Or is there another line without the "no encryption" above it as well?

Читать полностью…

PostgreSQL

This way you also exclude empty spaces, a single \n, \t characters and so on

Читать полностью…

PostgreSQL

You can create a check constraint for values <> ‘’

Читать полностью…

PostgreSQL

can you plz tell how to deal with '' constraint if someone will pass '' this then I dot want to allow him/her?

Читать полностью…

PostgreSQL

CREATE TABLE Orders (
order_id SERIAL PRIMARY KEY, -- Auto-incrementing primary key
order_date TIMESTAMP DEFAULT NOW(), -- Date and time of the order
total_amount NUMERIC(10, 2) NOT NULL, -- Total amount for the order
txt TEXT NOT NULL -- Text field, cannot be NULL
); I created table like this now I am trying to add record
INSERT INTO Orders ( total_amount, txt) VALUES (250.75, '' ); even though I pass null value still allowing; however txt field has not null constraint

Читать полностью…

PostgreSQL

Hi
Is there any way to get discount or get coupon codes for postgreSQL certification from enterprisedb.
Exam costs 100$
Kindly help.

Читать полностью…

PostgreSQL

Learn Manual, API Automation, Selenium Automation Testing for Job guarantee✈️

Learn in - Demand Tools
1. SELENIUM
2. POSTMAN
3. TestNG
4. REST ASSURED
5. GitHub
6. Cucumber
7. CI/CD Pipeline Setup
6. Jenkins and more....

• 1:1 Live Online Training
• Flexible Timings
• Unlimited Interviews
• Mock Interviews
Lowest Fee in the World

WhatsApp for more details
+91-700-421-9889

Читать полностью…

PostgreSQL

Hey guys,

Any idea why a normal select,insert, create and drop actions queries are needed for usage permission in pg_logical schema ?

Читать полностью…

PostgreSQL

User and encrypted password entry should be there in pool_passwd file. Password should be in encrypted form, not in plain.

Читать полностью…

PostgreSQL

Well, I reckon we've all once rebooted the wrong server, locked ourselves out of a live server with a wrong iptables rule etc.
But since I do databases full time, I kind of got *far* more careful. And I'm *so* glad that there are transactions 😇

Читать полностью…

PostgreSQL

s/production/developmestruction/

You essentially have four options now:
* restore to a new DB and write a client that syncs them
* try to restore in a single transaction (i.e., use --single-transaction and --clean in pg_restore) and hope that your clients can cope with it (and that you have a proper pg_dump, not just an SQL file...).
* if you only have a text/SQL file, sed, grep, vi and friends can help you restore the tables you f***ed up as new tables and then you might be able to re-fill your live tables with what you destroyed...
* schedule a downtime and do a proper restore

At the end of the day, anything that has been chanced in the DB since you dumped will be lost, unless you manage to get option #1 or #3 working, so...

Oh, and: Once you have this situation sorted, you should set up a "playground" copy of your DB that you can actually play around with. And familiarize yourself with things like PITR, RTO/RPO/RCO, real backups etc. pp.

Читать полностью…

PostgreSQL

Yeah, PostgreSQL made me learn NULL casting...

NULL::integer
NULL::text

Because Nulls are not typed, and without those, I had so many complaints. (I cannot find the function you are calling, despite you typing the name perfectly... With the parameters passed)...
Ughh, after awhile, you get used to it.

Читать полностью…

PostgreSQL

Yh i made a back up earlier
And now restoring it
And I am not sure if I can do: create empty db and restore to that
Why because it is a production thing

Читать полностью…

PostgreSQL

You should, your client tried to connect unencrypted...

Читать полностью…

PostgreSQL

I tried with hostssl also, but getting same result

Читать полностью…

PostgreSQL

Hello,
I'm getting this error while connecting from test to prod. i made all necessary entries in hba file. But application did not face this issue. Any one have idea on this?

psql: error: connection to server on
"10.200.00.01", port 5432 failed: FATAL: no pg_hba.conf entry for host "10.34.00.01", user "dba", database "postgres", no encryption

Читать полностью…

PostgreSQL

Add a constraint and check that the length of the trimmed string is > 0

Читать полностью…

PostgreSQL

That insert is not passimg NULL it is passing ‘’, which is not a null value

Читать полностью…

PostgreSQL

Again, you're not passing NULL, you're passing an empty string.

Читать полностью…

PostgreSQL

It would be easier if you share a test case, I mean, show us the creation of the table and your insert and select from that table.

Читать полностью…
Subscribe to a channel