
What do you think about :

1. OPTION RETURNS NULL ON NULL INPUT (when function is created) change to
  RETURNS <val> ON NULL INPUT .... ???

2. CREATE TYPE .. with  INHERITS (..) like in CREATE TABLE
 but type should be normaly with including base type
 create type A AS (A INT,B INT);
and
 create type B AS (C INT, D INT) INHERITS( A ); ==
 create type B AS (A INT, B INT, C INT, D INT );
 can be ??

3. For example :
 CREATE TABLE t1 (A  INT, B INT );
 CREATE TABLE t2 (C INT , D INT ) INHERITS(t1);

 SELECT a.* FRom t2 a ; give me 4 cols (A,B,C and D)
 SELECT a.C,((t1)a).* FROM t2 a; should give me 3 cols (C,A and B)
 its like in c++ , but in c++ you need to use ((t1&)a) cast it.
 I cant find the words in english , but i hope you understand this.

4. This is q question . Is in SPI sth like try and catch () ?
  It would be very useful to error ..
  plpgsql should have this too.
  (itd also from c++)

5. What do you think about crontab in postgres database , like pg_crontab
  ?

6. the last. i need to create function with only one select with security
  definer . The best way is to create function with language SQL . Problem
  is becaulse table from which is this select dont exists , jet. It will
  be a temp table . When i create function [....] language SQL there is a error
  about non-exists table. So i have proposition to include option to
  create function command : WITH / WITHOUT CHECK ... ? or PRECOMPILE ?
  What do you think ?




thanks :>
 ivan

Tue, 8 Jul 2003 23:31:57 +0200 (CEST)
ivan <iv@psycho.pl>
sugsestions
On Tue, 2003-07-08 at 21:31, ivan wrote:
> What do you think about :
> 
> 1. OPTION RETURNS NULL ON NULL INPUT (when function is created) change to
>   RETURNS <val> ON NULL INPUT .... ???

I personally think this should be up to the specific function to
capture.  This way it could be a complex result.

> 2. CREATE TYPE .. with  INHERITS (..) like in CREATE TABLE
>  but type should be normaly with including base type
>  create type A AS (A INT,B INT);
> and
>  create type B AS (C INT, D INT) INHERITS( A ); ==
>  create type B AS (A INT, B INT, C INT, D INT );
>  can be ??

I like this.  The equivalent table syntax for absorbing table structure
into another table is LIKE:

CREATE TABLE othertable (acol integer);
CREATE TABLE a (col integer, LIKE othertable, anothercol integer);

I could see:

CREATE TYPE a AS (a integer, b integer);
CREATE TYPE b AS (LIKE a, c integer, d integer);

> 5. What do you think about crontab in postgres database , like pg_crontab
>   ?

This has been debated several times.  Each time it has ended with
standard cron being the best solution for cron.
09 Jul 2003 13:26:28 +0000
Rod Taylor <rbt@rbt.ca>
Re: sugsestions


On Wed, 9 Jul 2003, Rod Taylor wrote:

> On Tue, 2003-07-08 at 21:31, ivan wrote:
> > What do you think about :
> >
> > 1. OPTION RETURNS NULL ON NULL INPUT (when function is created) change to
> >   RETURNS <val> ON NULL INPUT .... ???
>
> I personally think this should be up to the specific function to
> capture.  This way it could be a complex result.
>
> > 2. CREATE TYPE .. with  INHERITS (..) like in CREATE TABLE
> >  but type should be normaly with including base type
> >  create type A AS (A INT,B INT);
> > and
> >  create type B AS (C INT, D INT) INHERITS( A ); ==
> >  create type B AS (A INT, B INT, C INT, D INT );
> >  can be ??
>
> I like this.  The equivalent table syntax for absorbing table structure
> into another table is LIKE:
>
> CREATE TABLE othertable (acol integer);
> CREATE TABLE a (col integer, LIKE othertable, anothercol integer);
>
> I could see:
>
> CREATE TYPE a AS (a integer, b integer);
> CREATE TYPE b AS (LIKE a, c integer, d integer);
>

This way is very good !!
I see i thing :

CREATE TABLE a AS (a int, b int);
CREATE TABLE b AS (x a.a%ROWTYPE, a int, b a.b%ROWTYPE);
like in plpgsql...
May be there should be others word , but i want to show my view .. :>

Thu, 10 Jul 2003 21:01:34 +0200 (CEST)
ivan <iv@psycho.pl>
Re: sugsestions