looks like fid column must be of type serial

Comments

dries’s picture

Component: file system » postgresql database

Care to explain why? How to reproduce?

Keymone’s picture

i've installed drupal on postgresql database and just tried to upload file (after enabling upload module)

drupal produced error

Message pg_query() [function.pg-query]: Query failed: ERROR: relation `drupal_files_fid_seq` does not exist in D:\Keymone\www\drupal\includes\database.pgsql.inc on line 125.
Severity error

and

Message query: SELECT nextval('drupal_files_fid_seq') in D:\Keymone\www\drupal\includes\database.pgsql.inc on line 144.
Severity error

sammys’s picture

Assigned: Unassigned » sammys
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new823 bytes

I concur this is a bug. The patch supplied applies, but it doesn't constrain the serial field to a positive integer. Have attached the patch with that corrected. RTBC!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

sammys’s picture

Status: Fixed » Closed (duplicate)

This hasn't been resolved in HEAD actually. It appears you may have patched another branch? Another two issues have been filed about this and my latest update from HEAD doesn't have this patch applied. The other issue is at http://drupal.org/node/100143. I'm marking this as a duplicate.