Skip site navigation (1) Skip section navigation (2)

Is this possible.

From: "Harvey, Allan AC" <HarveyA(at)OneSteel(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Is this possible.
Date: 2006-03-29 23:45:20
Message-ID: 3C2CED55DF019847AB7BD7317837BDA9095861AB@ntlmsg02.onesteel.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi all,

Can sombody please help me realise a function, the intent as described by...

-- Function to create the table for a new point

CREATE OR REPLACE FUNCTION make_table( varchar ) RETURNS VARCHAR AS '
    CREATE TABLE $1(
        parameter varchar(8) NOT NULL,
        value float NOT NULL,
        dt timestamp NOT NULL
        );

    CREATE INDEX $1_dtindex ON $1( dt );

    SELECT $1;
' LANGUAGE SQL;

I'm using 7.4.5.

Thanks

Allan




The material contained in this email may be confidential, privileged or copyrighted. If you are not the intended recipient, use, disclosure or copying of this information is prohibited. If you have received this document in error, please advise the sender and delete the document. Neither OneSteel nor the sender accept responsibility for any viruses contained in this email or any attachments.

Responses

pgsql-general by date

Next:From: Sergey E. KoposovDate: 2006-03-30 00:07:49
Subject: weird GROUP BY error
Previous:From: Scott MarloweDate: 2006-03-29 23:23:27
Subject: Re: PostgreSQL client api

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group