1 The SQL statement needs to specify the schema name.When the uri is local, this is not required.
2 For All statements with arguments , the automatically generated arguments are column 1,2,3... . When the uri is local, The parameters are clear.
3 'select ' and 'returning ' is not allowed. Must specify parameters. When the uri is local, * is allowed.
4 Parameters of the int type are automatically converted to pgtype.Int. Parameters of the String type are automatically converted to pgtype.Text. When the uri is local, int64 is int64. Override db type bigint to go type int64 didn't work when I used it.
5 timestamp(6) with time zone is changed to interface{}. When the uri is local, It is right pgtype.Timestamptz.
6 else: the uri password don’t support '@' '#' '%' .
Relevant log output
1 dto/pg/query/a.sql:13:7: relation "table_a" does not exist
3 dto/pg/query/a.sql:14:1: star expansion failed for query
6 invalid URL escape "%A")
Database schema
CREATE TABLE IF NOT EXISTS blacklist
(
id bigint NOT NULL DEFAULT nextval('blacklist_id_seq'::regclass),
created_at timestamp(6) with time zone NOT NULL DEFAULT now(),
state smallint NOT NULL DEFAULT 0,
remark character varying(255) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
CONSTRAINT blacklist_pkey PRIMARY KEY (id)
)
TABLESPACE pg_default;
Version
1.27.0
What happened?
The database has two schema.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go