Adam Witney wrote:
> I would like to provide a limited view of my database to some users,
> so i thought of creating a second database (I can control access by IP
> address through pg_hba.conf) with some views that queried the first
> database using dblink.
In my opinion dblink is not the ri
Create a plpgsql function that reformats your row as an array.
Example:
I have a table named task_parameter with three columns:
Table "camera.task_parameter"
Column | Type | Modifiers
--+-
Hi Ivanmara,
There are two things about cursors you may need to remember ( I hope I
do remember fairly well not to error in this response :-) ).
1) A cursor is similar to a pointer to a given record, which means it's
"vision" is limited to the current record, and you move the cursor
forward by
On Tue, Dec 16, 2008 at 5:55 PM, Phillip Berry
wrote:
> Hi Everyone,
>
> Just wondering what the maximum reasonable free space map setting should be?
> I'm receiving the
> following advice from vacuum:
>
> INFO: free space map contains 170803 pages in 117 relations
> DETAIL: A total of 185000
Hello. how can i get count of the rows in cursor ?
this code always return 0, but table is not empty:
open curs for select * from classif order by id;
GET DIAGNOSTICS i = ROW_COUNT;
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
ht
Phillip Berry writes:
> So I guess my question is, is there a point where you start to see
> diminishing returns or even negative returns by setting the fsm too high?
There is no benefit to having FSM larger than necessary, so I suppose that
qualifies as "diminishing returns". The only negative
On Wed, Dec 17, 2008 at 2:29 AM, Phillip Berry
wrote:
>
> The data in nearly every table is constantly changing due to a high volume of
> new data constantly
> coming in, processing on the existing data and heavy reporting being done all
> at once all day and
> night.
>
> So I guess my question
The data in nearly every table is constantly changing due to a high volume of
new data constantly
coming in, processing on the existing data and heavy reporting being done all
at once all day and
night.
So I guess my question is, is there a point where you start to see diminishing
returns or
A couple of questions about these files:
1) When are these generated? Is this once an archive is generated, or
once the full archive_command has run?
2) Is there any harm in removing these files by appending an rm command
at the end of archive_command?
-salman
--
Sent via pgsql-general maili
On Wed, Dec 17, 2008 at 12:55 AM, Phillip Berry
wrote:
>
> I thought 185K was pretty high, is going to 700K+ reasonable? I've got 16GB
> of ram and am running
> very high volume 100GB+ DBs.
all depends on how often does the data change. I would go with
whatever vacuum is suggesting on producti
Hi Everyone,
Just wondering what the maximum reasonable free space map setting should be?
I'm receiving the
following advice from vacuum:
INFO: free space map contains 170803 pages in 117 relations
DETAIL: A total of 185000 page slots are in use (including overhead).
733008 page slots are re
Madison Kelly writes:
> I was reading that before posting, but have not been able to get it to
> work. After looking at it again I think it's because I've cast the
> column I restricted in the SELECT as a 'TIMESTAMP WITHOUT TIME ZONE'. So
> I ALTERed the column to be 'TIMESTAMP WITH TIME ZONE'
"Gauthier, Dave" writes:
> I have a PL-Pgsql function that returns a record of a type that have 4
> elements (columns). Let's say the first element/column is called "id_num".
> Is there a way I can specify the id_num element of the record returned from
> iside a query?
> For example, select
It seems you haven't done anything you need to save, so why
not save time and just reinstall postgres?
TJ
Hi
Â
I started the installation of postrgres got distracted and then started again but forgot my password
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make c
If you need them one by one why fetch them into tmprec? Take a look at
the docs for FETCH:
http://www.postgresql.org/docs/8.3/static/sql-fetch.html
especially the FETCH ABSOLUTE...
regards,
Ivan Pavlov
On Dec 16, 3:37 pm, aesthete2...@gmail.com ("Иван Марков") wrote:
> Hello. I have table class
Please disregard my other message. I didn't get what you are trying to
do at first.
You can do this with dynamic SQL: Look at 38.5.4. Executing Dynamic
Commands (http://www.postgresql.org/docs/current/static/plpgsql-
statements.html).
I guess something like
EXECUTE 'SELECT tmprec.group' || i INTO
Wooops... typo... should have been
select x.col_a, y.col1
from mytable x, my_plpgsql_fn(x.val) y
where x.col_b = 'foo';
-Original Message-
From: Gauthier, Dave
Sent: Tuesday, December 16, 2008 3:38 PM
To: Gauthier, Dave; Andreas Kretschmer; pgsql-general@postgresql.org
Subject
And it's a bit more complicated at that. Here's why
I discovered that I can refer to the function as a relation in the from
clause...
select y.col1 from my_plpgsql_fn(789) y
but I need to pass the function something from outside, sort of like...
select x.col_a, y.col1
from mytable x,
Hello. I have table classif with columns:
... , group1, group2, group3, ... , group48, ...
In function i do query and want run on every row and dynamically operate on
columns from group1 to group20. I do something like this:
OPEN curs FOR select * from classif;
loop
fetch curs into tmprec;
Gauthier, Dave schrieb:
> Hi:
>
>
>
> I have a PL-Pgsql function that returns a record of a type that have 4
> elements
> (columns). Let’s say the first element/column is called “id_num”. Is there a
> way I can specify the id_num element of the record returned from iside a
> query?
>
>
It is generally better to save the balance. The general rule in
accounting systems design is "what can be printed, should be
explicitly on disk". for an invoice:
value before tax, tax percentage, value after tax, total before tax,
total after tax, etc, should all be saved explicitly.
An account s
Raymond O'Donnell wrote:
On 16/12/2008 19:16, Madison Kelly wrote:
I want to say in my WHERE clause to offset the value I am giving by X
number of hours and to display the column I've cast as a timestamp
offset by the same X hours.
You could use AT TIME ZONE to shift it the required number o
The example I gave was overly simplistic. I actually want to look at more than
one of the columns in the returned record, so rewritting it to return an int
won't address the need for the other columns. And no, it does not return a
set/array of records. It returns just one record.
If I run
Gauthier, Dave schrieb:
> Hi:
>
>
>
> I have a PL-Pgsql function that returns a record of a type that have 4
> elements
> (columns). Let’s say the first element/column is called “id_num”. Is there a
> way I can specify the id_num element of the record returned from iside a
> query?
>
>
On 16/12/2008 19:16, Madison Kelly wrote:
> I want to say in my WHERE clause to offset the value I am giving by X
> number of hours and to display the column I've cast as a timestamp
> offset by the same X hours.
You could use AT TIME ZONE to shift it the required number of hours:
http://www.po
Hi all,
I've got a database with a column I CAST as a TIMESTAMP. The data in
the database is GMT.
I want to say in my WHERE clause to offset the value I am giving by X
number of hours and to display the column I've cast as a timestamp
offset by the same X hours.
I am sure this is pos
2008/12/15 Ketema Harris :
> I am interested in finding out the pros, cons, pitfalls of using the
> following design:
>
> Manual insert into Table A.
> Table A has a BEFORE INSERT trigger that causes an insert to table B.
> Table B has an AFTER INSERT trigger that causes an insert back to table A
>
On 16/12/2008 16:26, Ketema wrote:
> automatically after certain input. In analyzing the task I saw two
> main paths. Use the trigger and rule system that Pg provides or
> construct external methods to control the logic and issue "simple"
> commands to insert data when appropriate. I chose to us
Hi,
currently i'm trying to $SUBJECT, my actual approach is to look at
n_tup_upd and n_tup_hot_upd assuming the more near they are the
better... is that a good assumption? what else can i see?
--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
G
Hi:
I have a PL-Pgsql function that returns a record of a type that have 4 elements
(columns). Let's say the first element/column is called "id_num". Is there a
way I can specify the id_num element of the record returned from iside a query?
For example, select col1 from thetable where my_plpg
> How often are you using the "bank balance" value?
I have no data on this as of yet, but it obviously needs to be correct
for when the user looks at it.
> The opposite argument, is how long does the computation take?
The computation is simple, however the amount of data that goes into
it g
On Dec 16, 10:31 am, Ivan Pavlov wrote:
> I can't answer your question but I think you may have a serious
> database design issue at hand.
> Why not try to accomplish your goals in a simpler way?
>
> Regards,
> Ivan Pavlov
>
> On Dec 15, 12:49 pm, ket...@ketema.net (Ketema Harris) wrote:
>
> > I a
Merlin Moncure schrieb:
what does this get you?
Not as much as I first hoped. In hindsight it was a silly question.
The point was that the view gets linked into an Access-Client.
There are some Users who shouldn't bother to figure over the results as
it does some performance statistics.
T
Neiter LOG ERRORS nor REJECT LIMIT are implemented in PostgreSQL,
though I agree they may be useful. Both can be simulated with a custom
stored procedure which loops over a cursor and updates row-by-row,
trapping errors along the way. This will, of course, be slower.
regards,
Ivan Pavlov
On Dec
I can't answer your question but I think you may have a serious
database design issue at hand.
Why not try to accomplish your goals in a simpler way?
Regards,
Ivan Pavlov
On Dec 15, 12:49 pm, ket...@ketema.net (Ketema Harris) wrote:
> I am interested in finding out the pros, cons, pitfalls of us
El Martes, 16 de Diciembre de 2008 04:02:09 Sebastian Böhm escribió:
> sorry I was not very precise.
>
> My question is what does it actually mean in the end for these two
> functions:
>
> pg_stat_get_db_tuples_returned(oid) bigint Number of tuples returned
> for database
> pg_stat_get_db_tup
On Mon, Dec 15, 2008 at 9:38 PM, Klint Gore wrote:
> Andreas wrote:
>>
>> I'd like to have a view only to be used by certain users.
>> The tables are public.
>>
>> Can this only be done by restricting access to the tables?
>>
>
> GRANT/REVOKE works on views
> revoke all on aview from public;
> gra
Willy-Bas Loos escribió:
> What happens to indexes on a table that is TRUNCATEd?
They are truncated too.
--
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql
Sun Dong wrote:
> When I tried to load it, I always get this error:
> invalid byte sequence for encoding "UTF8": 0x00
>
> how could I load this into postgresql database?
I'm afraid you'll have to preprocess the file to convert the 0x00 into
\000. Obviously, if you're inserting this file into
I would like to provide a limited view of my database to some users,
so i thought of creating a second database (I can control access by IP
address through pg_hba.conf) with some views that queried the first
database using dblink.
The problem is that dblink requires non-superusers to prov
What happens to indexes on a table that is TRUNCATEd?
WBL
--
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw
It is assumed you are running Unix (or Linux). The commands you've
been provided with are standard Unix system commands that will help
you find the files (pg_hba.conf) you are looking for, the output of
these commands (locate or find) is the absolute path to your queried
file (in your case pg_hba.c
42 matches
Mail list logo