Closed (fixed)
Project:
Database Administration
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Jul 2004 at 18:45 UTC
Updated:
19 Sep 2005 at 21:55 UTC
It would be great, when the run script function would allow SQL comments in/for/between (probably multiple) SQL-statements (respectively would parse them off).
There is no database interface such as phpMyAdmin for postgresql and the phpPgAdmin project on sourceforge seems to be dead... And the the task of creating tables/indexes/sequences for new modules would be much easier/faster/simpler in this case: simply paste the supplyed sql code into the run-script-form and run it. Here filestore.pgsql, for example:
-- translated by Rene Laederach (mussi@snoop.alphanet.ch)
BEGIN;
CREATE TABLE filestore (
nid INT NOT NULL DEFAULT '0',
...
);
--
-- Sequences for table IF NOT EXISTS FSTORE_UPLOAD
--
CREATE SEQUENCE fstore_upload_;
CREATE TABLE fstore_upload (
upid INT DEFAULT nextval('if not exists fstore_upload_'),
...
);
--
-- Indexes for table IF NOT EXISTS FSTORE_UPLOAD
--
CREATE INDEX timestamp_fstore_upload_index ON fstore_upload (timestamp);
--
-- Sequences for table IF NOT EXISTS FSTORE_UPLOAD
--
COMMIT;
Comments
Comment #1
jeremy commentedDo you get an error when you paste in and run a script that has comments? I don't, using MySQL - it simply ignores the comments, which is what I would expect. (The only way I can get an error is if I have a trailing comment -- but even this doesn't hurt anything, the tables are still created.)
Comment #2
jeremy commentedSQL comments are now filtered when a script is run from the remote client.
Comment #3
(not verified) commentedComment #4
(not verified) commentedComment #5
jeremy commentedManually closing, the project module doesn't seem to do this automatically anymore.