Help with syntax error

2024-12-01 Thread Arbol One
I have these tables: *CREATE TABLE IF NOT EXISTS registrar ( index SERIAL, registrar_id TEXT, day TEXT NOT NULL, month TEXT NOT NULL, year TEXT NOT NULL, hour TEXT NOT NULL, minute TEXT NOT NULL, second TEXT NOT NULL, millisecond TEXT NOT NULL, am_pm TEXT NOT NULL, admin BOOLEAN NOT NULL DEFAULT

Re: Help with syntax error

2024-12-01 Thread Ron Johnson
On Sun, Dec 1, 2024 at 7:14 PM Arbol One wrote: > I have these tables: > > > > > > > > > > > > > > > > > > > > *CREATE TABLE IF NOT EXISTS registrar ( index SERIAL, registrar_id TEXT, > day TEXT NOT NULL, month TEXT NOT NULL, year TEXT NOT NULL, hour TEXT NOT > NULL, minute TEXT NOT NULL, second

Re: Help with syntax error

2024-12-01 Thread Arbol One
😳 O, I feel so dumb, that I find it so funny!! Thanks man!!! I need to step away from the computer for a while, I think fatigue is getting the best of me. On 2024-12-01 7:17 p.m., Adrian Klaver wrote: On 12/1/24 16:14, Arbol One wrote: I have these tables: *CREATE TABLE IF NOT EXISTS re

Re: Help with syntax error

2024-12-01 Thread Adrian Klaver
On 12/1/24 16:14, Arbol One wrote: I have these tables: *CREATE TABLE IF NOT EXISTS registrar ( index SERIAL, registrar_id TEXT, day TEXT NOT NULL, month TEXT NOT NULL, year TEXT NOT NULL, hour TEXT NOT NULL, minute TEXT NOT NULL, second TEXT NOT NULL, millisecond TEXT NOT NULL, am_pm TEXT NOT N

Re: Errors when restoring backup created by pg_dumpall

2024-12-01 Thread Tom Lane
Adrian Klaver writes: > On 12/1/24 13:14, Tom Lane wrote: >> It would be useful to know what is the command at line 4102 >> of all.sql. > It is here: > https://gist.github.com/poperigby/fcb59eb6c22c6051800e06a0ec482b49 > CREATE TABLE public.geodata_places ( > id integer NOT NULL, > na

Re: Errors when restoring backup created by pg_dumpall

2024-12-01 Thread Adrian Klaver
On 12/1/24 13:14, Tom Lane wrote: Adrian Klaver writes: On 12/1/24 12:05, PopeRigby wrote: I'm still getting this error: psql:all.sql:4102: ERROR:  type "earth" does not exist LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth The issue is still this: SELECT pg_catalog

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Alexander Farber
Yes thank you, I have tried specifying the port at the CLI too... that did not help. But restarting PostgreSQL in my custom /docker-entrypoint-initdb.d/run-after-initdb.sh has helped, even though I am not sure if it is the best way: #!/bin/sh LANGUAGES="de en fr nl pl ru" createuser --username=

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Peter Kleiner
Seems too easy but have you tried psql -p 6432 -h localhost words_de ? On Sun, Dec 1, 2024 at 3:59 PM Alexander Farber wrote: > My problem is related to > https://github.com/docker-library/postgres/pull/440/files > > But I am yet not sure how to enable listening at localhost again >

Re: Errors when restoring backup created by pg_dumpall

2024-12-01 Thread Tom Lane
Adrian Klaver writes: > On 12/1/24 12:05, PopeRigby wrote: >> I'm still getting this error: >> >> psql:all.sql:4102: ERROR:  type "earth" does not exist >> LINE 1: ...ians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth > The issue is still this: > SELECT pg_catalog.set_config('search_pa

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Adrian Klaver
On 12/1/24 11:34, Alexander Farber wrote: Good evening, I am trying to create a Dockerfile for development purposes, which would run Jetty and PostgreSQL. The PostgreSQL related part is below: When I connect to the docker container via terminal, I am able to connect with "psql words_de" comm

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Tom Lane
Alexander Farber writes: > it is empty in my docker container (but "localhost" on my prod server), > so I probably need to investigate that... I'm betting the postgresql.conf entry is being overridden with a postmaster command-line switch (not an initdb switch, which merely sets up a postgresql.c

Re: Errors when restoring backup created by pg_dumpall

2024-12-01 Thread Adrian Klaver
On 12/1/24 12:05, PopeRigby wrote: On 11/30/24 19:58, Tom Lane wrote: "David G. Johnston" writes: Ok, so the error is not emanating from your code but rather the body of the ll_to_earth function defined in the earthdistance extension. Yeah.  That is CREATE FUNCTION ll_to_earth(float8, float

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Alexander Farber
My problem is related to https://github.com/docker-library/postgres/pull/440/files But I am yet not sure how to enable listening at localhost again

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Alexander Farber
I have tried changing the line in the Dockerfile, but it has not helped yet: ENV POSTGRES_INITDB_ARGS "--set port=6432 --set max_connections=20 --set max_wal_size=2GB --set listen_addresses=localhost" ENV POSTGRES_INITDB_ARGS "--set port=6432 --set max_connections=20 --set max_wal_size=2GB --set

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Alexander Farber
Thank you, Tom - On Sun, Dec 1, 2024 at 8:58 PM Tom Lane wrote: > Alexander Farber writes: > > TLDR "psql words_de" works, but "psql -h localhost words_de" does not > > I'd try connecting the first way and seeing what "show > listen_addresses" gives. Per your report it should be "*", > but may

Re: Errors when restoring backup created by pg_dumpall

2024-12-01 Thread Tom Lane
PopeRigby writes: > I've applied the following patch to postgres: > https://www.postgresql.org/message-id/attachment/122092/0002-earthdistance-sql-functions.patch Cool. You did actually install the new scripts into your target installation, right? > I'm still getting this error: > psql:all.sql:

Re: Errors when restoring backup created by pg_dumpall

2024-12-01 Thread PopeRigby
On 11/30/24 19:58, Tom Lane wrote: "David G. Johnston" writes: Ok, so the error is not emanating from your code but rather the body of the ll_to_earth function defined in the earthdistance extension. Yeah. That is CREATE FUNCTION ll_to_earth(float8, float8) RETURNS earth LANGUAGE SQL IMMUTAB

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Tom Lane
Alexander Farber writes: > TLDR "psql words_de" works, but "psql -h localhost words_de" does not I'd try connecting the first way and seeing what "show listen_addresses" gives. Per your report it should be "*", but maybe something is overriding that. If it is "*", then it seems like something i

Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Alexander Farber
Good evening, I am trying to create a Dockerfile for development purposes, which would run Jetty and PostgreSQL. The PostgreSQL related part is below: FROM postgres:17-alpine3.20 RUN apk update && apk upgrade && apk add --no-cache curl wget openjdk21 tini # Tell docker-entrypoint.sh to create su