skip to Main Content

How to make use the PASSWORD with the official postgres docker image?

Trying to make use of the official postgres docker image with: docker run --rm -d --name my-postgres --network my-network -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=mysuperduperlongpwstring -e POSTGRES_DB=postgres -v /path/to/postgres/data/:/var/lib/postgresql/data postgres However, when creating postgres connection with Go, psqlInfo := fmt.Sprintf( "host=%s port=%s…

VIEW QUESTION

Problem connecting to the PostgresSQL from Docker

Sample from class: try: conn = psycopg2.connect( database='ytbstatsdb', host='127.0.0.1', user='admin', password='admin123', port='5432' ) except psycopg2.Error as e: print(e) cursor = conn.cursor() engine = sqlalchemy.create_engine('postgresql://admin:admin123@localhost:5432/ytbstatsdb') df_videos_details.to_sql('testtable', engine, if_exists='replace', index=False) Docker file (docker-compose.yaml): services: db: image: postgres ports: - 5432:5432 restart: always…

VIEW QUESTION

Accent sensitive sort in PostgreSQL

How to sort text in PostgreSQL in Latvian alphabetic order, so any letter without accent always comes before the letter with accent? For example this select * from ( select 'bā' as name union select 'āa' union select 'ac' union…

VIEW QUESTION
Back To Top
Search