In other words, even though the poster selected for display can't be identified, can it be done in such a way that "poster #1" is the one retrieved?
There is no way to be sure which post you get (currently).
If it's possible to do this via SQL, then that would definitely be the best solution since that is the only way PvdImport currenly communicates with PVD.
Is there some kind of record in the database, perhaps, that keep track of "selected images"? In my DB, I've only got one image per movie, so this hasn't been an issue for me...
Select one (random) poster as BLOB (you will get actual bytes of the post in "imgdata" field) (this poster is shown for a movie if you have not manually defined default poster):
SELECT FIRST 1 * FROM IMAGES WHERE ("imgtype" = 0) AND ("mid" = %d)
Select all posters as BLOB (you will get actual bytes of the post in "imgdata" field):
SELECT * FROM IMAGES WHERE ("imgtype" = 0) AND ("mid" = %d)
Select poster set as default as BLOB (you will get actual bytes of the post in "imgdata" field):
SELECT * FROM IMAGES
INNER JOIN MOVIES ON (MOVIES."mid" = IMAGES."mid" AND MOVIES."defposter" = IMAGES."imgid")
WHERE IMAGES."mid" = %d
Note: This code will return nothing if no poster is set as default