automate creation of pgsql view

espie - February 18, 2008 - 12:10
Project:Database Administration
Version:5.x-1.x-dev
Component:PostgreSQL Support
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Taking a hint from alt_login, a dba.install file can create the required view.
Tested with a recent pgsql.
If pgsql 7.3 support is required, someone would need to cook a query that will only work with pgsql >=7.4, and run the test to create the right view in the installer...

Right now, both view creation commands `work', but only one creates a usable view.

AttachmentSize
install.patch842 bytes

#1

dww - February 20, 2008 - 01:04
Status:needs review» needs work

I have no way to test this right now. If someone else does, I'd commit it.

However, there are some code style problems in this patch, in particular, the use of tabs not spaces. Also, we don't normally split such SQL statements into so many lines. So, please fix those and then see if you can find someone else to test this. Thanks.

#2

Jeremy - February 20, 2008 - 01:29

Ooh, I've been wanting to play with my local PostgreSQL installation. I'll try and test this soon.

I don't see any need to support PostgreSQL 7.3 personally, but what does Drupal core support?

#3

espie - February 20, 2008 - 23:42

Well, it definitely works with recent postgresql (tested with 8.2.6) here, so if pgsql <=7.3 is not an issue, I'll clean up the style issues with my patch tomorrow...

next step will be to have a look at phppgadmin to see how to grab the missing table structure from php, and see if I can improve on the view...

 
 

Drupal is a registered trademark of Dries Buytaert.