This module lacked a postgresql schema and code in the .install to put it into a postgresql database. I've remedied this.

I've written in the postgresql schema into a .pgsql file as well as into the masquerade.install file. Written based on the 4.7.0 release. You can download it here and try it out. Let me know when this is integrated into a new release version.

http://download.farbot.com/index.php?path=php%2FDrupal/

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PMunn’s picture

Title: postgresql compatibility » starbow's hack for og support

I've added in the code change starbow noted on the OG compatibility page into the zip file on my file archive above and given it a timestamp of today. I haven't done any testing of his change.

PMunn’s picture

Title: starbow's hack for og support » OG: postgresql and og support patch for 4.7.0
FileSize
2.98 KB

Here's a patch for the entire masquerade directory to enable postgresql and og support. Execute the patch from outside the masquerade directory.

PMunn’s picture

FileSize
1.48 KB

The two features are distinct from each other -- postgresql support changes don't overlap the OG support patches.

So I'm posting them separately for review and (hopefully) inclusion, having rebuilt them from the most recent .tar.gz.

Here is the postgresql patch.

PMunn’s picture

And this is the OG support patch, which is Starbow's hack from another thread, as mentioned elsewhere, but applied to the latest .tar.gz file for masquerade.

Tobias Maier’s picture

Status: Needs review » Needs work
create table masquerade

should be

CREATE TABLE {masquerade}

please remove all your comments like this one:

+	// 2006-06-10 PMunn, applied fix from starbow at http://drupal.org/node/62278

consider how wasted our code would be if we would add such fragments everywhere

but thanks in general for your work

PMunn’s picture

Status: Needs work » Needs review
FileSize
1.21 KB

Thank you for the feedback. Here are the updated postgresql and og patches zipped together.

Tobias Maier’s picture

it is better not to zip them because it is more work to review them.
attach them on two comments

the og patch is not idented the right way (I hope this was the right word :/ )

cu

PMunn’s picture

Here is the og patch, with indenting corrected.

PMunn’s picture

And here is the postgresql patch, separated from the zip file.

PMunn’s picture

Hi folks. It's already October. Can someone step in and apply this patch or at least test it more fully for application to the CVS version? I'd like to have this issue closed up soon since it touches on one of the more popular modules (OG), and so I can start using it on my own site(s).

Gurpartap Singh’s picture

Can you please resubmit a patch for masquerade.install file, providing the pgsql database only. I'll review and commit after it.

PMunn’s picture

FileSize
764 bytes

Here is the masquerade.install only patch.

The only difference between this patch and the previous one I posted is I snipped out the references to masquerade.pgsql, which didn't used to exist.

Gurpartap Singh’s picture

Status: Needs review » Reviewed & tested by the community

Thank you PMunn

Gurpartap Singh’s picture

FileSize
1.07 KB

I had requested someone to review the pgsql import code over IRC. I was suggested to revert table names format {masquerade} to "masquerade". Updated patch with that.

Also, shouldn't int() be used instead of numeric()?

PMunn’s picture

That quoted-tablename PHP doesn't look like it'll work.

Why would you undo the braces on the patch? It runs just fine.

There is no "int()" in PostgreSQL, just "integer". The numeric type allows you to specify the precision.

For an overview, see this documentation page on integer and arbitrary-precision number types.

Gurpartap Singh’s picture

I am not familiar to postgresql. So it's your responsibility further issues arising with it ;). I'll commit it today.

Gurpartap Singh’s picture

Last patch(PMunn's) is into cvs now. ;-)

merlinofchaos’s picture

The {} is a Drupalism and it allows db_query to support table indices. It should not be removed.

Gurpartap Singh’s picture

Someone over #postgresql suggested "tablename" is generic than curlies around them. but..

Drupal way :)

PMunn’s picture

Version: 4.7.x-1.x-dev » 7.x-1.x-dev

I've tested today's CVS version with a new drupal install and an existing one (on PostgreSQL) and finds it works as advertised. I'll prepare a new, og compatibility patch if necessary and post it here for review.

PMunn’s picture

Title: OG: postgresql and og support patch for 4.7.0 » OG: postgresql and og support patch for cvs
Status: Reviewed & tested by the community » Needs review
FileSize
804 bytes

This patch implementing organic groups support in masquerade is nearly identical to the last-posted one with a slight change in line numbers to reflect changes in the CVS code base. I'm having a very hard time getting my mind around configuring organic groups in my dev/sandbox drupal site so I haven't been able to test it yet. Other testers are welcome, but I did have the previous, identical version working fine in another sandbox at one point so I'm confident this one will do well overall.

Gurpartap Singh’s picture

Status: Needs review » Active

What's the conflict between OG and Masquerade? Is it user_load(), I guess?

Changing issue to active for OG case.

PMunn’s picture

Here's the issue I drew from back when I opened the thread.
http://drupal.org/node/62278

I should retest and see if my patch is needed or not with the latest masquerade code. I'm guessing it isn't but I'll look into it.

Gurpartap Singh’s picture

That issue has been fixed.. Need to test for current code.

Gurpartap Singh’s picture

Title: OG: postgresql and og support patch for cvs » OG and Masquerade compatibility
PMunn’s picture

A few cursory tests of this patched version (cvs version) shows it working just fine on my postgresql configurations.

Thanks to everyone for reviewing and posting the code.

Gurpartap Singh’s picture

Status: Active » Fixed

Thanks all dears :). Please make this issue active, if any unexpected case persists. Thanks again PMunn

Anonymous’s picture

Status: Fixed » Closed (fixed)

  • Commit bfaa871 on 5.x-1.x, 6.x-1.x, master, 8.x-2.x, 8.x-2.x-admin-menu, 8.x-1.x-1836516 by Gurpartap Singh:
    #67483 - PGSQL sql data added, thanks to PMunn
    
    

  • Commit bfaa871 on 5.x-1.x, 6.x-1.x, master, 8.x-2.x, 8.x-2.x-admin-menu, 8.x-1.x-1836516 by Gurpartap Singh:
    #67483 - PGSQL sql data added, thanks to PMunn