Temp 2091396239
Temp 2091396239
Docs: https://termux.dev/docs
Donate: https://termux.dev/donate
Community: https://termux.dev/community
\du
'
CREATE ROLE postgres;
ERROR: syntax error at or near "';
ALTER ROLE postgres SUPERUSER;
\du
CREATE ROLE postgres WITH LOGIN PASSWORD '"
LINE 1: CREATE ROLE postgres';
^
postgres=# CREATE ROLE postgres;
CREATE ROLE
postgres=# 2024-10-25 20:19:15.494 PST [24483] LOG: chec
kpoint starting: time
2024-10-25 20:19:15.925 PST [24483] LOG: checkpoint comp
lete: wrote 5 buffers (0.0%); 0 WAL file(s) added, 0 remo
ved, 0 recycled; write=0.404 s, sync=0.009 s, total=0.432
s; sync files=5, longest=0.006 s, average=0.002 s; dista
nce=3 kB, estimate=243 kB; lsn=0/152E6A8, redo lsn=0/152E
650
postgres=# ALTER ROLE postgres SUPERUSER;
ALTER ROLE
postgres=#
postgres=# \du
postgres=# ALTER ROLE postgres WITH LOGIN PASSWORD 'yourp
assword';
ALTER ROLE
postgres=# \du
postgres=# psql -U postgres -d postgres
postgres-# ^C
postgres=#
\q
➜ ~ psql -U postgres -d postgres
psql (17.0)
Type "help" for help.
postgres=# o
postgres-# ^C
postgres=#
\q
➜ ~
➜ ~ pg_dump -U postgres -d postgres --schema-only --tabl
e=users --table=chats --table=participants --table=messag
es --table=media --table=message_statuses > schema_dump.s
ql
➜ ~ postgres
postgres does not know where to find the server configura
tion file.
You must specify the --config-file or -D invocation optio
n or set the PGDATA environment variable.
➜ ~ ls
alpine
android-sdk
bin
data.json
downloads
final_install_recording.sh
llama.cpp
mysession.log
openai_rest_service.go
openai_rest_service_with_config.go
openai_service_archive.tar.gz
schema_dump.sql
start-ubuntu.sh
storage
t-20241020061925.apkg
terminal_recording_script.sh
terminal_sessions
typescript
ubuntu-binds
ubuntu-fs
ubuntu.sh
update_replay_session.patch
➜ ~ bin/share_file.sh schema_dump.sql
Starting: Intent { act=android.intent.action.CREATE_DOCUM
ENT typ=text/plain cmp=com.google.android.documentsui/com
.android.documentsui.picker.PickActivity (has extras) }
➜ ~ less !!:1
➜ ~ less schema_dump.sql
➜ ~ cp ~/downloads/openai_rest_service_patch.patch .c
➜ ~
➜ ~
➜ ~
➜ ~
➜ ~ vi bin/share_file.sh
➜ ~ bin/share_file.sh schema_dump.sql
Starting: Intent { act=android.intent.action.CREATE_DOCUM
ENT typ=text/plain cmp=com.google.android.documentsui/com
.android.documentsui.picker.PickActivity (has extras) }
➜ ~ vi bin/share_file.sh
➜ ~ # I-set ang file path gikan sa positional argument
FILE_PATH="file://$1"
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: chats; Type: TABLE; Schema: public; Owner: postg
res
--
--
-- Name: chats_chat_id_seq; Type: SEQUENCE; Schema: publi
c; Owner: postgres
--
--
-- Name: chats_chat_id_seq; Type: SEQUENCE OWNED BY; Sche
ma: public; Owner: postgres
--
--
-- Name: media; Type: TABLE; Schema: public; Owner: postg
res
--
--
-- Name: media_media_id_seq; Type: SEQUENCE; Schema: publ
ic; Owner: postgres
--
--
-- Name: media_media_id_seq; Type: SEQUENCE OWNED BY; Sch
ema: public; Owner: postgres
--
--
-- Name: message_statuses; Type: TABLE; Schema: public; O
wner: postgres
--
--
-- Name: messages; Type: TABLE; Schema: public; Owner: po
stgres
--
--
-- Name: messages_message_id_seq; Type: SEQUENCE; Schema:
public; Owner: postgres
--
CREATE SEQUENCE public.messages_message_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: messages_message_id_seq; Type: SEQUENCE OWNED BY
; Schema: public; Owner: postgres
--
--
-- Name: participants; Type: TABLE; Schema: public; Owner
: postgres
--
--
-- Name: users; Type: TABLE; Schema: public; Owner: postg
res
--
--
-- Name: users_user_id_seq; Type: SEQUENCE; Schema: publi
c; Owner: postgres
--
--
-- Name: users_user_id_seq; Type: SEQUENCE OWNED BY; Sche
ma: public; Owner: postgres
--
--
-- Name: chats chat_id; Type: DEFAULT; Schema: public; Ow
ner: postgres
--
--
-- Name: media media_id; Type: DEFAULT; Schema: public; O
wner: postgres
--
--
-- Name: messages message_id; Type: DEFAULT; Schema: publ
ic; Owner: postgres
--
--
-- Name: users user_id; Type: DEFAULT; Schema: public; Ow
ner: postgres
--
--
-- Name: media media_pkey; Type: CONSTRAINT; Schema: publ
ic; Owner: postgres
--
--
-- Name: message_statuses message_statuses_pkey; Type: CO
NSTRAINT; Schema: public; Owner: postgres
--
--
-- Name: messages messages_pkey; Type: CONSTRAINT; Schema
: public; Owner: postgres
--
--
-- Name: participants participants_pkey; Type: CONSTRAINT
; Schema: public; Owner: postgres
--
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: publ
ic; Owner: postgres
--
--
-- Name: users users_username_key; Type: CONSTRAINT; Sche
ma: public; Owner: postgres
--
--
-- Name: message_statuses message_statuses_message_id_fke
y; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
--
-- Name: message_statuses message_statuses_user_id_fkey;
Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
--
-- Name: messages messages_chat_id_fkey; Type: FK CONSTRA
INT; Schema: public; Owner: postgres
--
--
-- Name: messages messages_media_id_fkey; Type: FK CONSTR
AINT; Schema: public; Owner: postgres
--
--
-- Name: messages messages_sender_id_fkey; Type: FK CONST
RAINT; Schema: public; Owner: postgres
--
--
-- Name: participants participants_user_id_fkey; Type: FK
CONSTRAINT; Schema: public; Owner: postgres
--
--
-- PostgreSQL database dump complete
--
➜ ~