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

Поиск
Список
Период
Сортировка
Искать

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

От:
"Mel Jamero" <mel@gmanmi.tv>
Дата:
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)

От:
"A.Bhuvaneswaran" <bhuvansql@myrealbox.com>
Дата:
> 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

От:
Ben Clewett <B.Clewett@roadrunner.uk.com>
Дата:

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

От:
Nabil Sayegh <postgresql@e-trolley.de>
Дата:
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

От:
Ben Clewett <B.Clewett@roadrunner.uk.com>
Дата:
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

От:
Ben Clewett <B.Clewett@roadrunner.uk.com>
Дата:
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

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Ben Clewett  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

От:
Ben Clewett <B.Clewett@roadrunner.uk.com>
Дата:
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  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

От:
"A.Bhuvaneswaran" <bhuvanbk@yahoo.com>
Дата:
> 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)

От:
Robert Treat <xzilla@users.sourceforge.net>
Дата:
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

От:
Josh Berkus <josh@agliodbs.com>
Дата:
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

FAQ