bugGNUstep - Bugs: bug #11624, GDL2 errors on deleted columns in...

Group
 
 

bug #11624: GDL2 errors on deleted columns in PostgreSQL tables

Submitter:  Peter Cooper <comrade>
Submitted:  Mon 17 Jan 2005 06:58:44 PM UTC
   
 
Category:  gdl2 Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  ayers
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 18 Jan 2005 12:26:29 PM UTC, comment #3: 

Fixed with:
2005-01-18  Peter Cooper  <xxx@xxx.xxx>

  • EOAdaptors/Postgres95/Postgres95Channel.m

  ([-_describeBasicEntityWithName:forModel:]): Ignore droped
  columns.

David Ayers <ayers>
Group Member
Tue 18 Jan 2005 11:06:40 AM UTC, comment #2: 

Of course you're right. There is a better way to identify a dropped column: check the pg_attribute.attisdropped boolean.

Attached is a much nicer patch, I hope.

Peter Cooper <comrade>
Tue 18 Jan 2005 10:20:00 AM UTC, comment #1: 

Thanks for the patch!  I'm a bit reluctant to commit it as it is.  Have you checked whether there is some more deterministic way to figure out if a column has been droped?   I have a hard time to imagine that PostgreSQL uses this kind of ILIKE comparison on the attribute name to identify droped columns internally.  But if it turns out to be that way, I'll commit it.

As to why the adaptor is still called Postgres95, well simply put, other things have simply been higher on my TODO and currently RL is keeping me pretty tied up.  If someone would like to rework the code to a new PostrgreSQL Adaptor and rework the internal code, I'd be gratefull.  (I've started a few times but never reached anything worthwhile to commit.)  But please insure that the adaptor will work with versions 7.4.(latest) and above.

David Ayers <ayers>
Group Member
Mon 17 Jan 2005 06:58:44 PM UTC, original submission:  

When connecting to a PostgreSQL database which contains tables  with deleted columns, an exception is raised due to illegal characters in the placeholders for the deleted columns.

The Postgres95 (why is it called this?) adaptor should ignore these placeholder columns.

A simple patch to Postgres95Channel.m is attached. The patch is cautious and uses the ILIKE operator, rather than the LIKE operator to avoid capitalisation issues depending on encoding and capitalisation rules. There may be a small performance hit, but it should be safer.

Peter Cooper <comrade>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #2375:  new-dropped-columns.diff added by comrade (961B - text/plain - Updated patch to use the pg_attribute.attisdropped boolean)
file #2372:  ignore-deleted-columns.diff added by comrade (883B - application/octet-stream - Patch for PostgreSQL adaptor to ignore deleted columns)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-01-18 ayers StatusNeed Info Fixed
    Open/ClosedOpen Closed
2005-01-18 comrade Attached File- Added new-dropped-columns.diff, #2075
2005-01-18 ayers StatusNone Need Info
    Assigned toNone ayers
2005-01-17 comrade Attached File- Added ignore-deleted-columns.diff, #2072

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code