Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Issue with ALTER Table.

0 views
Skip to first unread message

BGoebel

unread,
Mar 20, 2013, 11:49:20 AM3/20/13
to
The Catalog Schema seems not to be actualized when using ALTER Table.

I had reported a problem with adding NEW tables, which was corrected by
Hiroshi

http://postgresql.1045698.n5.nabble.com/SQLDescribeCol-schema-cache-not-being-updated-completely-tt4372956.html

http://postgresql.1045698.n5.nabble.com/Error-Retrieving-Catalog-Info-tt4598955.html

When "altering" a Datatype of column the problem still exists:
Say, we have a column which is defined as varchar(40)
Now we want to double the field length to varchar(80)

ALTER TABLE customer
ALTER COLUMN address TYPE varchar(80),

When we retrieving the Catalog-Info the value of field length is 40
furthermore.

After a new connect we get the correct values and only after that writing /
reading to the altered field is working reliable.

Has someone found a another workaround, idea, hint preventing a reconnect?

regards,

BGoebel





--
View this message in context: http://postgresql.1045698.n5.nabble.com/Issue-with-ALTER-Table-tp5749048.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


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

Heikki Linnakangas

unread,
Mar 22, 2013, 6:03:33 AM3/22/13
to
On 20.03.2013 17:49, BGoebel wrote:
> The Catalog Schema seems not to be actualized when using ALTER Table.
>
> I had reported a problem with adding NEW tables, which was corrected by
> Hiroshi
>
> http://postgresql.1045698.n5.nabble.com/SQLDescribeCol-schema-cache-not-being-updated-completely-tt4372956.html
>
> http://postgresql.1045698.n5.nabble.com/Error-Retrieving-Catalog-Info-tt4598955.html
>
> When "altering" a Datatype of column the problem still exists:
> Say, we have a column which is defined as varchar(40)
> Now we want to double the field length to varchar(80)
>
> ALTER TABLE customer
> ALTER COLUMN address TYPE varchar(80),
>
> When we retrieving the Catalog-Info the value of field length is 40
> furthermore.
>
> After a new connect we get the correct values and only after that writing /
> reading to the altered field is working reliable.

Can you provide a self-contained test case? That seems like the exact
same thing reported by Jan-Peter Seifelt, in the first thread that you
linked to, and that one was fixed. I can't reproduce it here, either. I
tested the attached test case, but it correctly prints the new size
after ALTER.

- Heikki
alter-test.c
common.h

BGoebel

unread,
Mar 22, 2013, 12:51:29 PM3/22/13
to
Our test bench had an error.
psqlodbc30a.dll 9.1.2.1 is delivering the expected results.

Hiroshi wrote he had no time for check this issue, and so i never checked
our code.
I am really sorry for that.

BGoebel



Heikki Linnakangas-6 wrote
> --
> Sent via pgsql-odbc mailing list (

> pgsql-odbc@

> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
>
>
> alter-test.c (1K)
> <http://postgresql.1045698.n5.nabble.com/attachment/5749243/0/alter-test.c>
> common.h (5K)
> <http://postgresql.1045698.n5.nabble.com/attachment/5749243/1/common.h>

















--
View this message in context: http://postgresql.1045698.n5.nabble.com/Issue-with-ALTER-Table-tp5749048p5749301.html
0 new messages