[development] A little pgsql help

Keegan Quinn keegan at thebasement.org
Thu Mar 9 10:46:13 UTC 2006


On Thu, Mar 09, 2006 at 05:37:06AM -0500, Dan Ziemecki wrote:
> Can I get one of you postgre aficionados to translate this SQL statement
> into whatever works on postgre for me?

Yeah.

> DROP TABLE IF EXISTS subscriptions_holding;

Not sure about that "if exists" clause.

DROP TABLE subscriptions_holding; works though.

> CREATE TABLE subscriptions_holding (
>   rid int(11) NOT NULL auto_increment COMMENT 'Unique row ID',
>   content blob NOT NULL COMMENT 'The node array',
>   type tinytext NOT NULL COMMENT 'New node or comment',
>   op tinytext NOT NULL COMMENT 'The operation on the node',
>   uid int(11) NOT NULL default '0' COMMENT 'The person performing the
> operation',
>   PRIMARY KEY  ('rid')
> );

CREATE TABLE subscriptions_holding (
  rid SERIAL,
  content OID NOT NULL,
  type TEXT NOT NULL,
  op TEXT NOT NULL,
  uid INTEGER NOT NULL DEFAULT 0
);
COMMENT ON COLUMN subscriptions_holding.rid IS 'Unique row ID';
COMMENT ON COLUMN subscriptions_holding.content IS 'The node array';
COMMENT ON COLUMN subscriptions_holding.type IS 'New node or comment';
COMMENT ON COLUMN subscriptions_holding.op IS 'The operation on the node';
COMMENT ON COLUMN subscriptions_holding.uid IS 'The person performing the operation';

Tested on PostgreSQL 7.4.

HTH,

-- 
Keegan Quinn  <keegan at thebasement.org>
CEO, Producer
the basement productions
http://www.thebasement.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.drupal.org/pipermail/development/attachments/20060309/9b7ba0a3/attachment.pgp


More information about the development mailing list