Thread: function to determine size of a table (or even row)

function to determine size of a table (or even row)

From
"Mel Jamero"
Date:
hi all!

is there an intrinsic function in postgresql to determine the size of a
table (or a row)?

or has anyone created such who would like to share it with me?

thanks,

mel


Re: [ADMIN] function to determine size of a table (or even row)

From
"A.Bhuvaneswaran"
Date:
> is there an intrinsic function in postgresql to determine the size of a
> table (or a row)?

Refer contrib/dbsize to get database size and table size details.

regards,
bhuvaneswaran


Date Format

From
Ben Clewett
Date:
I am looking at date formats.  There seem to be a very limited set:
'ISO,'  'SQL', 'Postgres' and 'German' with sub-format of: 'European'
and 'NonEuropean'.

Has any member developed any way of having a more elaborate formats.
Like, idealy, an Agregate function which sets the date to any desired
format?

Thanks in advance for any help,

Ben


Re: Date Format

From
Nabil Sayegh
Date:
Am Die, 2003-04-08 um 11.59 schrieb Ben Clewett:

> Has any member developed any way of having a more elaborate formats.
> Like, idealy, an Agregate function which sets the date to any desired
> format?

AFAIR an aggregate is something that summarizes many rows to 1 row like:
avg(), sum() etc. (in grouped queries)

cu
--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : www.e-trolley.de


Re: Date Format

From
Ben Clewett
Date:
Yes, sorry, I mean a Function...

Ben

Nabil Sayegh wrote:
> Am Die, 2003-04-08 um 11.59 schrieb Ben Clewett:
>
>
>>Has any member developed any way of having a more elaborate formats.
>>Like, idealy, an Agregate function which sets the date to any desired
>>format?
>
>
> AFAIR an aggregate is something that summarizes many rows to 1 row like:
> avg(), sum() etc. (in grouped queries)
>
> cu


Triggers

From
Ben Clewett
Date:
Dear Novice,

I want to have a go at some Triggers.  To update summary records of
accounting data.

I see in the reference manual
http://www.de.postgresql.org/users-lounge/docs/7.2/postgres/sql-createconstraint.html
it makes the comment:

"It is not intended for general use."

Does this mean that there is a problem with triggers I should be aware of?

Thanks,

Ben


Re: Date Format

From
Tom Lane
Date:
Ben Clewett <B.Clewett@roadrunner.uk.com> writes:
> Has any member developed any way of having a more elaborate formats.

There's always to_char() ... it's pretty ugly but can format a date
practically any way you want.

            regards, tom lane


Re: Date Format

From
Ben Clewett
Date:
I see...

Found the reference:

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=functions-formatting.html

to_char(my_timestamp, 'DD/MM/YY')

This looks really exactly what I want, thanks!

Ben

Tom Lane wrote:
> Ben Clewett <B.Clewett@roadrunner.uk.com> writes:
>
>>Has any member developed any way of having a more elaborate formats.
>
>
> There's always to_char() ... it's pretty ugly but can format a date
> practically any way you want.
>
>             regards, tom lane
>


Re: Triggers

From
"A.Bhuvaneswaran"
Date:
> I want to have a go at some Triggers.  To update summary records of
> accounting data.
>
> I see in the reference manual
> http://www.de.postgresql.org/users-lounge/docs/7.2/postgres/sql-createconstraint.html
> it makes the comment:
>
> "It is not intended for general use."

postgres uses CREATE CONSTRAINT TRIGGER to create FK references during
pg_dump process. CREATE TRIGGER is what you are looking for.

regards,
bhuvaneswaran


Re: [ADMIN] function to determine size of a table (or even row)

From
Robert Treat
Date:
the dbsize contrib module will do database and table size.

Robert Treat

On Tue, 2003-04-08 at 04:26, Mel Jamero wrote:
> hi all!
>
> is there an intrinsic function in postgresql to determine the size of a
> table (or a row)?
>
> or has anyone created such who would like to share it with me?
>
> thanks,
>
> mel


Re: Triggers

From
Josh Berkus
Date:
Ben,

> I want to have a go at some Triggers.  To update summary records of
> accounting data.
>
> I see in the reference manual
>
http://www.de.postgresql.org/users-lounge/docs/7.2/postgres/sql-createconstraint.html
> it makes the comment:
>
> "It is not intended for general use."
>
> Does this mean that there is a problem with triggers I should be aware of?

No, it means that you're in the wrong part of the documentation.  You want
"CREATE TRIGGER" not "CREATE CONSTRAINT TRIGGER".

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco