You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
建表语句里引用了public.records,但是这个表不存在,导致没有建表。
select
sip_call_id as "CallID",
to_char(min(create_time),'HH24:MI:SS') as "startTime",
to_char(min(create_time),'YYYY-MM-DD') as "day",
to_char(max(create_time),'HH24:MI:SS') as "stopTime",
to_char(max(create_time) - min(create_time),'HH24:MI:SS') as "duration",
min(from_user) as "caller",
min(to_user) as "callee",
count()::int as "msgTotal",
min(user_agent) as "UA",
max(response_code)::int as "finalCode",
string_agg(DISTINCT CASE WHEN response_code BETWEEN 170 AND 190 THEN response_code::text END, ',') AS "tempCode"
from
public.records
where
create_time >= '2024-11-19 15:43:36' and create_time <= '2024-11-19 15:53:36'
group by sip_call_id
having count() >= 1
order by "startTime" desc
limit 10
建表语句里引用了public.records,但是这个表不存在,导致没有建表。
select
sip_call_id as "CallID",
to_char(min(create_time),'HH24:MI:SS') as "startTime",
to_char(min(create_time),'YYYY-MM-DD') as "day",
to_char(max(create_time),'HH24:MI:SS') as "stopTime",
to_char(max(create_time) - min(create_time),'HH24:MI:SS') as "duration",
min(from_user) as "caller",
min(to_user) as "callee",
count()::int as "msgTotal",
min(user_agent) as "UA",
max(response_code)::int as "finalCode",
string_agg(DISTINCT CASE WHEN response_code BETWEEN 170 AND 190 THEN response_code::text END, ',') AS "tempCode"
from
public.records
where
create_time >= '2024-11-19 15:43:36' and create_time <= '2024-11-19 15:53:36'
group by sip_call_id
having count() >= 1
order by "startTime" desc
limit 10
/app/node_modules/.pnpm/pg-pool@3.6.2_pg@8.12.0/node_modules/pg-pool/index.js:45
Error.captureStackTrace(err)
^
error: relation "public.records" does not exist
at /app/node_modules/.pnpm/pg-pool@3.6.2_pg@8.12.0/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async queryRecord (file:///app/db.mjs:90:17)
at async file:///app/app.mjs:30:16 {
length: 114,
severity: 'ERROR',
code: '42P01',
detail: undefined,
hint: undefined,
position: '637',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '1428',
routine: 'parserOpenTable'
}
Node.js v22.11.0
The text was updated successfully, but these errors were encountered: