Re: Behavior change of FK info query

Re: Behavior change of FK info query

am 04.11.2008 17:39:55 von Dave Page

2008/11/4 Hiroshi Saito :

> Furthermore, I think it good to use libpq by which 8.3.5 was released.
> So, it is better to pack up 08.03.0310.?
>
> to Dave and Inoue-san.
> What do you think?

08.03.0400 sounds better to me.


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Re: [ODBC] Behavior change of FK info query

am 05.11.2008 15:06:10 von Hiroshi Saito

Ok, agree. I will prepare it.
Then, I need carefully packaging.

----- Original Message -----
From: "Dave Page"


> 2008/11/4 Hiroshi Saito :
>
>> Furthermore, I think it good to use libpq by which 8.3.5 was released.
>> So, it is better to pack up 08.03.0310.?
>>
>> to Dave and Inoue-san.
>> What do you think?
>
> 08.03.0400 sounds better to me.
>
>
> --
> Dave Page
> EnterpriseDB UK: http://www.enterprisedb.com
>
> --
> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Bug fix request for 08.03.0400 ( was [BUGS] Behavior changeof FK info query)

am 07.11.2008 23:30:04 von Luiz

This is a multi-part message in MIME format.
--------------020408060109090106070107
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Hi,

There are some chance to implement also correction for this bug:

http://pgfoundry.org/tracker/index.php?func=3Ddetail&aid=3D1 010303&group_=
id=3D1000125&atid=3D538 =20
?

I attached a path for a change made on info.c of release 08.03.0300 sourc=
e.
I tested it with postgres 8.0 , 8.1 , 8.2 and 8.3 server and works fine.


This is just a change on one query made by PGAPI_Columns function as=20
showed bellow

..
..
..
(line 2066)
/*
* Create the query to find out the columns (Note: pre 6.3 did not
* have the atttypmod field)
*/
op_string =3D gen_opestr(like_or_eq, conn);
if (conn->schema_support)
{
strncpy(columns_query,
"select n.nspname, c.relname, a.attname"
", case when t.typtype =3D 'd' then t.typbasetype else=20
a.atttypid end as atttypid"
", coalesce(bt.typname, t.typname ) AS typname, a.attnum,=20
a.attlen"
", case when t.typtype =3D 'd' then t.typtypmod else=20
a.atttypmod end as atttypmod"
", a.attnotnull, c.relhasrules, c.relkind, c.oid, d.adsrc"
" from (((pg_catalog.pg_class c inner join=20
pg_catalog.pg_namespace n on n.oid =3D c.relnamespace",
sizeof(columns_query));
if (search_by_ids)
snprintf_add(columns_query, sizeof(columns_query), " and=20
c.oid =3D %u", reloid);
else
{
if (escTableName)
snprintf_add(columns_query, sizeof(columns_query), " and=20
c.relname %s'%s'", op_string, escTableName);
schema_strcat1(columns_query, " and n.nspname %s'%.*s'",=20
op_string, escSchemaName, SQL_NTS, szTableName, cbTableName, conn);
}
strcat(columns_query, ") inner join pg_catalog.pg_attribute a"
" on (not a.attisdropped)");
if (0 == attnum && (NULL == escColumnName || like_or_eq !=
=3D eqop))
strcat(columns_query, " and a.attnum > 0");
if (search_by_ids)
{
if (attnum !=3D 0)
snprintf_add(columns_query, sizeof(columns_query), " and=20
a.attnum =3D %d", attnum);
}
else if (escColumnName)
snprintf_add(columns_query, sizeof(columns_query), " and=20
a.attname %s'%s'", op_string, escColumnName);
strcat(columns_query,
" and a.attrelid =3D c.oid)"
" inner join pg_catalog.pg_type t on t.oid =3D a.atttypid)"
" left outer join pg_attrdef d on a.atthasdef and d.adrelid=20
=3D a.attrelid and d.adnum =3D a.attnum"
" left outer join pg_type bt on t.typtype =3D 'd' and=20
t.typbasetype =3D bt.oid" );
strcat(columns_query, " order by n.nspname, c.relname, attnum");
}


I will be really happy if this can be fixed.

Best Regards


Hiroshi Saito wrote:
> Ok, agree. I will prepare it.
> Then, I need carefully packaging.
>
> ----- Original Message ----- From: "Dave Page"
>
>
>> 2008/11/4 Hiroshi Saito :
>>
>>> Furthermore, I think it good to use libpq by which 8.3.5 was released=
..
>>> So, it is better to pack up 08.03.0310.?
>>>
>>> to Dave and Inoue-san.
>>> What do you think?
>>
>> 08.03.0400 sounds better to me.
>>
>>
>> --=20
>> Dave Page
>> EnterpriseDB UK: http://www.enterprisedb.com
>>
>> --=20
>> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-odbc
>

--=20
Luiz K. Matsumura
Plan IT Tecnologia Inform=E1tica Ltda.


--------------020408060109090106070107
Content-Type: text/plain;
name="info.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="info.c.patch"

2074,2077c2074,2079
< "select n.nspname, c.relname, a.attname, a.atttypid"
< ", t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull"
< ", c.relhasrules, c.relkind, c.oid, d.adsrc from (((pg_catalog.pg_class c"
< " inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace",
---
> "select n.nspname, c.relname, a.attname"
> ", case when t.typtype = 'd' then t.typbasetype else a.atttypid end as atttypid"
> ", coalesce(bt.typname, t.typname ) AS typname, a.attnum, a.attlen"
> ", case when t.typtype = 'd' then t.typtypmod else a.atttypmod end as atttypmod"
> ", a.attnotnull, c.relhasrules, c.relkind, c.oid, d.adsrc"
> " from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace",
2099,2101c2101,2104
< " 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");
---
> " 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"
> " left outer join pg_type bt on t.typtype = 'd' and t.typbasetype = bt.oid" );

--------------020408060109090106070107
Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable


--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

--------------020408060109090106070107--

Re: Bug fix request for 08.03.0400 ( was [BUGS] Behavior change of FK info query)

am 10.11.2008 15:39:32 von Hiroshi Saito

Hi Luiz-san.

Sorry, very late reaction....
Release timing was being fixed.

It seems that your proposal needs a complicated verification. I consider like an
improvement rather than a bug. then, there are some worries. it is lo type etc..
However, It seems that Inoue-san review passes. but, it is next release.

I appreciate your perseverance. thanks!

Regards,
Hiroshi Saito

----- Original Message -----
From: "Luiz K. Matsumura"


> Hi,
>
> There are some chance to implement also correction for this bug:
>
> http://pgfoundry.org/tracker/index.php?func=detail&aid=10103 03&group_id=1000125&atid=538
> ?
>
> I attached a path for a change made on info.c of release 08.03.0300 source.
> I tested it with postgres 8.0 , 8.1 , 8.2 and 8.3 server and works fine.
>
>
> This is just a change on one query made by PGAPI_Columns function as
> showed bellow
>
> .
> .
> .
> (line 2066)
> /*
> * Create the query to find out the columns (Note: pre 6.3 did not
> * have the atttypmod field)
> */
> op_string = gen_opestr(like_or_eq, conn);
> if (conn->schema_support)
> {
> strncpy(columns_query,
> "select n.nspname, c.relname, a.attname"
> ", case when t.typtype = 'd' then t.typbasetype else
> a.atttypid end as atttypid"
> ", coalesce(bt.typname, t.typname ) AS typname, a.attnum,
> a.attlen"
> ", case when t.typtype = 'd' then t.typtypmod else
> a.atttypmod end as atttypmod"
> ", a.attnotnull, c.relhasrules, c.relkind, c.oid, d.adsrc"
> " from (((pg_catalog.pg_class c inner join
> pg_catalog.pg_namespace n on n.oid = c.relnamespace",
> sizeof(columns_query));
> if (search_by_ids)
> snprintf_add(columns_query, sizeof(columns_query), " and
> c.oid = %u", reloid);
> else
> {
> if (escTableName)
> snprintf_add(columns_query, sizeof(columns_query), " and
> c.relname %s'%s'", op_string, escTableName);
> schema_strcat1(columns_query, " and n.nspname %s'%.*s'",
> op_string, escSchemaName, SQL_NTS, szTableName, cbTableName, conn);
> }
> strcat(columns_query, ") inner join pg_catalog.pg_attribute a"
> " on (not a.attisdropped)");
> if (0 == attnum && (NULL == escColumnName || like_or_eq != eqop))
> strcat(columns_query, " and a.attnum > 0");
> if (search_by_ids)
> {
> if (attnum != 0)
> snprintf_add(columns_query, sizeof(columns_query), " and
> a.attnum = %d", attnum);
> }
> else if (escColumnName)
> snprintf_add(columns_query, sizeof(columns_query), " and
> a.attname %s'%s'", op_string, escColumnName);
> strcat(columns_query,
> " 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"
> " left outer join pg_type bt on t.typtype = 'd' and
> t.typbasetype = bt.oid" );
> strcat(columns_query, " order by n.nspname, c.relname, attnum");
> }
>
>
> I will be really happy if this can be fixed.
>
> Best Regards
>
>
> Hiroshi Saito wrote:
>> Ok, agree. I will prepare it.
>> Then, I need carefully packaging.
>>
>> ----- Original Message ----- From: "Dave Page"
>>
>>
>>> 2008/11/4 Hiroshi Saito :
>>>
>>>> Furthermore, I think it good to use libpq by which 8.3.5 was released.
>>>> So, it is better to pack up 08.03.0310.?
>>>>
>>>> to Dave and Inoue-san.
>>>> What do you think?
>>>
>>> 08.03.0400 sounds better to me.
>>>
>>>
>>> --
>>> Dave Page
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>
>>> --
>>> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-odbc
>>
>
> --
> Luiz K. Matsumura
> Plan IT Tecnologia Inform?ica Ltda.
>
>


------------------------------------------------------------ --------------------


> 2074,2077c2074,2079
> < "select n.nspname, c.relname, a.attname, a.atttypid"
> < ", t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull"
> < ", c.relhasrules, c.relkind, c.oid, d.adsrc from (((pg_catalog.pg_class c"
> < " inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace",
> ---
>> "select n.nspname, c.relname, a.attname"
>> ", case when t.typtype = 'd' then t.typbasetype else a.atttypid end as atttypid"
>> ", coalesce(bt.typname, t.typname ) AS typname, a.attnum, a.attlen"
>> ", case when t.typtype = 'd' then t.typtypmod else a.atttypmod end as atttypmod"
>> ", a.attnotnull, c.relhasrules, c.relkind, c.oid, d.adsrc"
>> " from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace",
> 2099,2101c2101,2104
> < " 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");
> ---
>> " 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"
>> " left outer join pg_type bt on t.typtype = 'd' and t.typbasetype = bt.oid" );
>


------------------------------------------------------------ --------------------


>
> --
> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
>


--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc