FreeBSD Bugzilla – Attachment 208153 Details for
Bug 241116
net/asterisk16: fix cdr_pgsql for PostgreSQL 12
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix cdr_pgsql to work with all modern PostgreSQL versions (>8.0)
patch-cdr_cdr__pgsql.c (text/plain), 1.54 KB, created by
Christoph Moench-Tegeder
on 2019-10-07 14:31:04 UTC
(
hide
)
Description:
fix cdr_pgsql to work with all modern PostgreSQL versions (>8.0)
Filename:
MIME Type:
Creator:
Christoph Moench-Tegeder
Created:
2019-10-07 14:31:04 UTC
Size:
1.54 KB
patch
obsolete
>--- cdr/cdr_pgsql.c.orig 2019-10-06 21:08:37 UTC >+++ cdr/cdr_pgsql.c >@@ -707,7 +707,7 @@ static int config_module(int reload) > schemaname = ast_alloca(strlen(tmp_schemaname) * 2 + 1); > PQescapeStringConn(conn, schemaname, tmp_schemaname, strlen(tmp_schemaname), NULL); > >- snprintf(sqlcmd, sizeof(sqlcmd), "SELECT a.attname, t.typname, a.attlen, a.attnotnull, d.adsrc, a.atttypmod FROM (((pg_catalog.pg_class c INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace AND c.relname = '%s' AND n.nspname = %s%s%s) INNER JOIN pg_catalog.pg_attribute a ON (NOT a.attisdropped) AND a.attnum > 0 AND a.attrelid = c.oid) INNER JOIN pg_catalog.pg_type t ON t.oid = a.atttypid) LEFT OUTER JOIN pg_attrdef d ON a.atthasdef AND d.adrelid = a.attrelid AND d.adnum = a.attnum ORDER BY n.nspname, c.relname, attnum", >+ snprintf(sqlcmd, sizeof(sqlcmd), "SELECT a.attname, t.typname, a.attlen, a.attnotnull, pg_catalog.pg_get_expr(d.adbin, d.adrelid) adsrc, a.atttypmod FROM (((pg_catalog.pg_class c INNER JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace AND c.relname = '%s' AND n.nspname = %s%s%s) INNER JOIN pg_catalog.pg_attribute a ON (NOT a.attisdropped) AND a.attnum > 0 AND a.attrelid = c.oid) INNER JOIN pg_catalog.pg_type t ON t.oid = a.atttypid) LEFT OUTER JOIN pg_attrdef d ON a.atthasdef AND d.adrelid = a.attrelid AND d.adnum = a.attnum ORDER BY n.nspname, c.relname, attnum", > tablename, > ast_strlen_zero(schemaname) ? "" : "'", ast_strlen_zero(schemaname) ? "current_schema()" : schemaname, ast_strlen_zero(schemaname) ? "" : "'"); > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 241116
: 208153