Strongly typed?
Strongly typed?
От:
Carol Walter <walterc@indiana.edu>
Дата:
I'm moving from PostgreSQL 8.2.4 to PostgreSQL 8.3.6. When I restore the databases from the old instance to the new one, I get a lot of errors where the data types in keys don't match, e.g. the data type is integer in the base file but defined as numeric in the file that it is linked to. These are running databases so this situation must have been negotiated by 8.2 but not my 8.3. Is this something relatively new that I'm encountering, or is there a parameter someplace that I have set too tightly. BTW, I do see the value of the stronger typing; I just need to figure out what to do to get these user's data to the new instance. Thanks, Carol
Re: Strongly typed?
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Carol Walter wrote: > I'm moving from PostgreSQL 8.2.4 to PostgreSQL 8.3.6. When I restore > the databases from the old instance to the new one, I get a lot of > errors where the data types in keys don't match, e.g. the data type is > integer in the base file but defined as numeric in the file that it is > linked to. These are running databases so this situation must have been > negotiated by 8.2 but not my 8.3. Is this something relatively new that > I'm encountering, or is there a parameter someplace that I have set too > tightly. It's new -- some casts changed from implicit to explicit in 8.3. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Re: Strongly typed?
От:
Carol Walter <walterc@indiana.edu>
Дата:
Thanks so much. That's what I needed to know. I'm going to have to make some modifications to my script so that it reports what databases it's loading, and take steps to change the data types or, at least, hold them out. Carol On Mar 13, 2009, at 11:13 AM, Alvaro Herrera wrote: > Carol Walter wrote: >> I'm moving from PostgreSQL 8.2.4 to PostgreSQL 8.3.6. When I >> restore >> the databases from the old instance to the new one, I get a lot of >> errors where the data types in keys don't match, e.g. the data type >> is >> integer in the base file but defined as numeric in the file that it >> is >> linked to. These are running databases so this situation must have >> been >> negotiated by 8.2 but not my 8.3. Is this something relatively new >> that >> I'm encountering, or is there a parameter someplace that I have set >> too >> tightly. > > It's new -- some casts changed from implicit to explicit in 8.3. > > -- > Alvaro Herrera http://www.CommandPrompt.com/ > PostgreSQL Replication, Consulting, Custom Development, 24x7 support > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin
Re: Strongly typed?
От:
Scott Marlowe <scott.marlowe@gmail.com>
Дата:
On Fri, Mar 13, 2009 at 10:17 AM, Carol Walter wrote: > Thanks so much. That's what I needed to know. I'm going to have to make > some modifications to my script so that it reports what databases it's > loading, and take steps to change the data types or, at least, hold them > out. It might be easier to change them before dumping them out, in the source database.
Re: Strongly typed?
От:
Carol Walter <walterc@indiana.edu>
Дата:
That would be a better plan, but I don't know what they are. Is there an integrity check utility that will run the databases and check this? Carol On Mar 13, 2009, at 12:18 PM, Scott Marlowe wrote: > On Fri, Mar 13, 2009 at 10:17 AM, Carol Walter > wrote: >> Thanks so much. That's what I needed to know. I'm going to have >> to make >> some modifications to my script so that it reports what databases >> it's >> loading, and take steps to change the data types or, at least, hold >> them >> out. > > It might be easier to change them before dumping them out, in the > source database.
Re: Strongly typed?
От:
Scott Marlowe <scott.marlowe@gmail.com>
Дата:
On Fri, Mar 13, 2009 at 10:21 AM, Carol Walter wrote: > That would be a better plan, but I don't know what they are. Is there an > integrity check utility that will run the databases and check this? I'd just pg_dump -s (schema only) then restore the schema to an 8.3 and look for errors.