warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "SET" LINE 3: SET width = 320,frame_rate = 24,key_interval = '2',video_... ^ in /Users/hunmonk/Sites/drupal/drupal-5/includes/database.pgsql.inc on line 125.
user warning: query: INSERT INTO op_video_params SET width = 320,frame_rate = 24,key_interval = '2',video_bitrate = 320,audio_channels = '2',audio_sample_rate = '44100',audio_bitrate = 64,max_duration = 0,keep_source_file = 1 in /Users/hunmonk/Sites/drupal/drupal-5/includes/database.pgsql.inc on line 144.
warning: pg_query() [function.pg-query]: Query failed: ERROR: relation "op_video_params" does not exist in /Users/hunmonk/Sites/drupal/drupal-5/includes/database.pgsql.inc on line 125.
user warning: query: SELECT * FROM op_video_params WHERE params_id = 0 in /Users/hunmonk/Sites/drupal/drupal-5/includes/database.pgsql.inc on line 144.

doesn't look like postgres likes the SET syntax?

CommentFileSizeAuthor
#5 op_video_postgresql.patch38.56 KBjbrown
#1 pg_compat.patch8.1 KBhunmonk

Comments

hunmonk’s picture

Status: Active » Needs review
StatusFileSize
new8.1 KB

not only does postgres hate that syntax, but there aren't even any tables installed for postgres :/

attached patch adds postgres table creation statements in all relevant .install files, and fixes the insert queries to use a postgres compatible syntax.

patch generated against the DRUPAL-5--2 branch.

hunmonk’s picture

fyi, if you plan on upgrading this module to 6.x, i think you need to get rid of the enum data type in your tables -- as far as i know, Schema API doesn't support that type -- pretty sure it's MySQL-specific anyways...

jbrown’s picture

Title: postgres query error on adding a cck field » postgres support
Version: 5.x-2.5 » 5.x-3.x-dev
Assigned: Unassigned » jbrown
Category: bug » feature
Status: Needs review » Needs work

Thanks for looking into this hunmonk.

Could you roll a patch for 5.x-3.x? I don't intend to make any major changes to 5.x-2.x.

neilnz’s picture

Postgres 8.3 supports ENUM, but that's hardly a widespread release yet.

jbrown’s picture

StatusFileSize
new38.56 KB

volker sent me an updated version of 5.x-3.11 with postgres support.

I created this patch from it. It also has some other minor changes that need to be stripped out. I haven't tested it.

Hope to have postgres support in 5.x-4.0 and 6.x-4.0

Thanks volker!

jbrown’s picture

Project: OpenPackage Video » Blue Droplet Video
Version: 5.x-3.x-dev » 6.x-1.x-dev
jbrown’s picture

Status: Needs work » Postponed