Dear all,
I have installed Suse 9.0 in two pcs.
1. A Pentium III with 256 MB of RAM.
2. A AMD 3200 with 1024 MB of RAM.
Both have the same problem.
Using top can see that used memory increases by 4-20kb every 1-2 secs
and free is reduced by that amount. Further buffer size increases.
Eventually all physical and swap is used and if unlucky will Hung too!
Has anybody came across the same problem and if so what is set so
wrong?
Why buffer size increases all time ?
Thank You,
Savvas
Dear Kumar... thanks for you answer....
Oooo....Oooo............. it means I have to install
the qt designer (for qmake and make compiler), the
qtdriver for postgres an each workstation... We have
50 workstation. So I have to compile the program 50
times.
Is there any other possibility?
What is the meaning on the error message? It is
because of the XServer?
--- hemant kumar <technix88(a)yahoo.com> wrote:
> hello..
> there could be several reasons..But to start with..i
> will suggest..why don't you give the source code to
> the user and let him compile.
> These error look very cryptic right now...
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
>
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
Dear my friends...
I am using qt 3.2, postgres 7.2.x and SuSE 9.1.
I managed to developed an application with qt for the
first time (Thanks my friends...).
Now I want to put the application on the user's
computer. But if I execute the program, it does not
run as I exepected.
Here is the error message:
"
wallstreet@ss:~/kv> ls
kvadmin kvclient tabeldata
wallstreet@ss:~/kv> ./tabeldata&
[1] 1768
wallstreet@ss:~/kv> ./tabeldata: relocation error:
./tabeldata: undefined symbol: _ZN7QWidget7repaintEb
[1]+ Exit 127 ./tabeldata
wallstreet@ss:~/kv> ./kvadmin&
[1] 1774
wallstreet@ss:~/kv> ./kvadmin: relocation error:
./kvadmin: undefined symbol:
_ZN7QActionC1EP7QObjectPKc
[1]+ Exit 127 ./kvadmin
wallstreet@ss:~/kv> ./kvclient&
[1] 1779
wallstreet@ss:~/kv> ./kvclient: relocation error:
./kvclient: undefined symbol:
_ZN7QActionC1EP7QObjectPKc
[1]+ Exit 127 ./kvclient
wallstreet@ss:~/kv> ./kvclient
./kvclient: relocation error: ./kvclient: undefined
symbol: _ZN7QActionC1EP7QObjectPKc
wallstreet@ss:~/kv>
"
Why is that so? Any body would be so generous to give
me any solution and explanation why the programs run
properly on my computer but not on other computer?
It it because of the database driver of my qt for
postgress? What should I do now?
Thank you very much in advance.
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com
Sorry about the first post.
I read your link to the postgres site and noticed
the data type serial is just for notation.
drop sequence sales_salesid_seq;
create sequence sales_salesid_seq start with 501 increment by 1;
-----Original Message-----
From: Prabu Subroto [mailto:prabu_subroto@yahoo.com]
Sent: Wednesday, July 28, 2004 9:18 AM
To: suse-programming-e(a)suse.com
Subject: [suse-programming-e] Re: altering a starting value of "serial"
macro in postgres
OK I did it :
create sequence sales_salesid_seq;
alter table sales alter column salesid set default
nextval('sales_salesid_seq');
but a new problem comes, because the table "sales" is
not empty. if the sequence counter reach a value that
already exists in the table "sales" than of course
comes this error message :
"
kv=# insert into sales (firstname) values ('baru5');
ERROR: duplicate key violates unique constraint
"sales_pkey"
"
so now I think the only one solution is to set the
starting counter for the "serial" macro, for instance
to : "501" (the maximum current values of column
salesid is 500).
Anybody has a solution?
Thank you very much in advance.
--- Prabu Subroto <prabu_subroto(a)yahoo.com> wrote:
> Dear Scott...
>
> My God.... so I can not use "alter table" to define
> a
> column with int data type?
>
> Here is the detail condition:
> I have created a table "sales". And I forgot to
> define
> auto_increment for primary key "salesid" (int4). the
> table has already contented the data.
>
> I built an application with Qt. I thougt that I can
> define a column with auto_increment function
> afterall.
>
> I want my application program only has to insert
> "firstname", "lastname" etc. And the database server
> (postgres) will put the increment value into the
> salesid automatically.
>
> If I read your suggestion, that means...I have drop
> the column "salesid" and re-create the column
> "salesid". and it means, I will the data in the
> current "salesid" column.
>
> Do you have further suggestion?
>
> Thank you very much in advance.
> --- Scott Marlowe <smarlowe(a)qwest.net> wrote:
> > On Tue, 2004-07-27 at 11:16, Prabu Subroto wrote:
> > > Dear my friends...
> > >
> > > I am using postgres 7.4 and SuSE 9.1.
> > >
> > > I want to use auto_increment as on MySQL. I look
> > up
> > > the documentation on www.postgres.com and I
> found
> > > "serial" .
> > >
> > > But I don't know how to create auto_increment.
> > > here is my try:
> > > "
> > > kv=# alter table sales alter column salesid int4
> > > serial;
> > > ERROR: syntax error at or near "int4" at
> > character 40
> > > "
> >
> > Serial is a "macro" that makes postgresql do a
> > couple of things all at
> > once. Let's take a look at the important parts of
> > that by running a
> > create table with a serial keyword, and then
> > examining the table, shall
> > we?
> >
> > est=> create table test (id serial primary key,
> info
> > text);
> > NOTICE: CREATE TABLE will create implicit
> sequence
> > "test_id_seq" for
> > "serial" column "test.id"
> > NOTICE: CREATE TABLE / PRIMARY KEY will create
> > implicit index
> > "test_pkey" for table "test"
> > CREATE TABLE
> > test=> \d test
> > Table "public.test"
> > Column | Type | Modifiers
> >
>
--------+---------+------------------------------------------------------
> > id | integer | not null default
> > nextval('public.test_id_seq'::text)
> > info | text |
> > Indexes:
> > "test_pkey" primary key, btree (id)
> >
> > test=> \ds
> > List of relations
> > Schema | Name | Type | Owner
> > --------+-------------+----------+----------
> > public | test_id_seq | sequence | smarlowe
> > (1 row)
> >
> > Now, as well as creating the table and sequence,
> > postgresql has, in the
> > background, created a dependency for the sequence
> on
> > the table. This
> > means that if we drop the table, the sequence
> > created by the create
> > table statement will disappear as well.
> >
> > Now, you were close, first you need to add a
> column
> > of the proper type,
> > create a sequence and tell the table to use that
> > sequence as the
> > default. Let's assume I'd made the table test
> like
> > this:
> >
> > test=> create table test (info text);
> > CREATE TABLE
> > test=>
> >
> > And now I want to add an auto incrementing column.
>
> > We can't just add a
> > serial because postgresql doesn't support setting
> > defaults in an alter
> > table, so we just add an int4, make a sequence,
> and
> > assign the default:
> >
> > test=> alter table test add id int4 unique;
> > NOTICE: ALTER TABLE / ADD UNIQUE will create
> > implicit index
> > "test_id_key" for table "test"
> > ALTER TABLE
> > test=> create sequence test_id_seq;
> > CREATE SEQUENCE
> > test=> alter table test alter column id set
> default
> > nextval('test_id_seq'::text);
> > ALTER TABLE
> >
> >
> > Now, if you have a bunch of already existing rows,
> > like this:
> >
> > test=> select * from test;
> > info | id
> > ------+----
> > abc |
> > def |
> > (2 rows)
> >
> > then you need to populate those rows id field to
> put
> > in a sequence, and
> > that's pretty easy, actually:
> >
> > est=> update test set id=DEFAULT;
> > UPDATE 2
> > test=> select * from test;
> > info | id
> > ------+----
> > abc | 1
> > def | 2
> > (2 rows)
> >
> > test=>
> >
> > And there you go!
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> >
> > http://www.postgresql.org/docs/faqs/FAQ.html
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download
> now.
> http://messenger.yahoo.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
--
To unsubscribe, email: suse-programming-e-unsubscribe(a)suse.com
For additional commands, email: suse-programming-e-help(a)suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e
OK I did it :
create sequence sales_salesid_seq;
alter table sales alter column salesid set default
nextval('sales_salesid_seq');
but a new problem comes, because the table "sales" is
not empty. if the sequence counter reach a value that
already exists in the table "sales" than of course
comes this error message :
"
kv=# insert into sales (firstname) values ('baru5');
ERROR: duplicate key violates unique constraint
"sales_pkey"
"
so now I think the only one solution is to set the
starting counter for the "serial" macro, for instance
to : "501" (the maximum current values of column
salesid is 500).
Anybody has a solution?
Thank you very much in advance.
--- Prabu Subroto <prabu_subroto(a)yahoo.com> wrote:
> Dear Scott...
>
> My God.... so I can not use "alter table" to define
> a
> column with int data type?
>
> Here is the detail condition:
> I have created a table "sales". And I forgot to
> define
> auto_increment for primary key "salesid" (int4). the
> table has already contented the data.
>
> I built an application with Qt. I thougt that I can
> define a column with auto_increment function
> afterall.
>
> I want my application program only has to insert
> "firstname", "lastname" etc. And the database server
> (postgres) will put the increment value into the
> salesid automatically.
>
> If I read your suggestion, that means...I have drop
> the column "salesid" and re-create the column
> "salesid". and it means, I will the data in the
> current "salesid" column.
>
> Do you have further suggestion?
>
> Thank you very much in advance.
> --- Scott Marlowe <smarlowe(a)qwest.net> wrote:
> > On Tue, 2004-07-27 at 11:16, Prabu Subroto wrote:
> > > Dear my friends...
> > >
> > > I am using postgres 7.4 and SuSE 9.1.
> > >
> > > I want to use auto_increment as on MySQL. I look
> > up
> > > the documentation on www.postgres.com and I
> found
> > > "serial" .
> > >
> > > But I don't know how to create auto_increment.
> > > here is my try:
> > > "
> > > kv=# alter table sales alter column salesid int4
> > > serial;
> > > ERROR: syntax error at or near "int4" at
> > character 40
> > > "
> >
> > Serial is a "macro" that makes postgresql do a
> > couple of things all at
> > once. Let's take a look at the important parts of
> > that by running a
> > create table with a serial keyword, and then
> > examining the table, shall
> > we?
> >
> > est=> create table test (id serial primary key,
> info
> > text);
> > NOTICE: CREATE TABLE will create implicit
> sequence
> > "test_id_seq" for
> > "serial" column "test.id"
> > NOTICE: CREATE TABLE / PRIMARY KEY will create
> > implicit index
> > "test_pkey" for table "test"
> > CREATE TABLE
> > test=> \d test
> > Table "public.test"
> > Column | Type | Modifiers
> >
>
--------+---------+------------------------------------------------------
> > id | integer | not null default
> > nextval('public.test_id_seq'::text)
> > info | text |
> > Indexes:
> > "test_pkey" primary key, btree (id)
> >
> > test=> \ds
> > List of relations
> > Schema | Name | Type | Owner
> > --------+-------------+----------+----------
> > public | test_id_seq | sequence | smarlowe
> > (1 row)
> >
> > Now, as well as creating the table and sequence,
> > postgresql has, in the
> > background, created a dependency for the sequence
> on
> > the table. This
> > means that if we drop the table, the sequence
> > created by the create
> > table statement will disappear as well.
> >
> > Now, you were close, first you need to add a
> column
> > of the proper type,
> > create a sequence and tell the table to use that
> > sequence as the
> > default. Let's assume I'd made the table test
> like
> > this:
> >
> > test=> create table test (info text);
> > CREATE TABLE
> > test=>
> >
> > And now I want to add an auto incrementing column.
>
> > We can't just add a
> > serial because postgresql doesn't support setting
> > defaults in an alter
> > table, so we just add an int4, make a sequence,
> and
> > assign the default:
> >
> > test=> alter table test add id int4 unique;
> > NOTICE: ALTER TABLE / ADD UNIQUE will create
> > implicit index
> > "test_id_key" for table "test"
> > ALTER TABLE
> > test=> create sequence test_id_seq;
> > CREATE SEQUENCE
> > test=> alter table test alter column id set
> default
> > nextval('test_id_seq'::text);
> > ALTER TABLE
> >
> >
> > Now, if you have a bunch of already existing rows,
> > like this:
> >
> > test=> select * from test;
> > info | id
> > ------+----
> > abc |
> > def |
> > (2 rows)
> >
> > then you need to populate those rows id field to
> put
> > in a sequence, and
> > that's pretty easy, actually:
> >
> > est=> update test set id=DEFAULT;
> > UPDATE 2
> > test=> select * from test;
> > info | id
> > ------+----
> > abc | 1
> > def | 2
> > (2 rows)
> >
> > test=>
> >
> > And there you go!
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> >
> > http://www.postgresql.org/docs/faqs/FAQ.html
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download
> now.
> http://messenger.yahoo.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
Dear Scott...
My God.... so I can not use "alter table" to define a
column with int data type?
Here is the detail condition:
I have created a table "sales". And I forgot to define
auto_increment for primary key "salesid" (int4). the
table has already contented the data.
I built an application with Qt. I thougt that I can
define a column with auto_increment function afterall.
I want my application program only has to insert
"firstname", "lastname" etc. And the database server
(postgres) will put the increment value into the
salesid automatically.
If I read your suggestion, that means...I have drop
the column "salesid" and re-create the column
"salesid". and it means, I will the data in the
current "salesid" column.
Do you have further suggestion?
Thank you very much in advance.
--- Scott Marlowe <smarlowe(a)qwest.net> wrote:
> On Tue, 2004-07-27 at 11:16, Prabu Subroto wrote:
> > Dear my friends...
> >
> > I am using postgres 7.4 and SuSE 9.1.
> >
> > I want to use auto_increment as on MySQL. I look
> up
> > the documentation on www.postgres.com and I found
> > "serial" .
> >
> > But I don't know how to create auto_increment.
> > here is my try:
> > "
> > kv=# alter table sales alter column salesid int4
> > serial;
> > ERROR: syntax error at or near "int4" at
> character 40
> > "
>
> Serial is a "macro" that makes postgresql do a
> couple of things all at
> once. Let's take a look at the important parts of
> that by running a
> create table with a serial keyword, and then
> examining the table, shall
> we?
>
> est=> create table test (id serial primary key, info
> text);
> NOTICE: CREATE TABLE will create implicit sequence
> "test_id_seq" for
> "serial" column "test.id"
> NOTICE: CREATE TABLE / PRIMARY KEY will create
> implicit index
> "test_pkey" for table "test"
> CREATE TABLE
> test=> \d test
> Table "public.test"
> Column | Type | Modifiers
>
--------+---------+------------------------------------------------------
> id | integer | not null default
> nextval('public.test_id_seq'::text)
> info | text |
> Indexes:
> "test_pkey" primary key, btree (id)
>
> test=> \ds
> List of relations
> Schema | Name | Type | Owner
> --------+-------------+----------+----------
> public | test_id_seq | sequence | smarlowe
> (1 row)
>
> Now, as well as creating the table and sequence,
> postgresql has, in the
> background, created a dependency for the sequence on
> the table. This
> means that if we drop the table, the sequence
> created by the create
> table statement will disappear as well.
>
> Now, you were close, first you need to add a column
> of the proper type,
> create a sequence and tell the table to use that
> sequence as the
> default. Let's assume I'd made the table test like
> this:
>
> test=> create table test (info text);
> CREATE TABLE
> test=>
>
> And now I want to add an auto incrementing column.
> We can't just add a
> serial because postgresql doesn't support setting
> defaults in an alter
> table, so we just add an int4, make a sequence, and
> assign the default:
>
> test=> alter table test add id int4 unique;
> NOTICE: ALTER TABLE / ADD UNIQUE will create
> implicit index
> "test_id_key" for table "test"
> ALTER TABLE
> test=> create sequence test_id_seq;
> CREATE SEQUENCE
> test=> alter table test alter column id set default
> nextval('test_id_seq'::text);
> ALTER TABLE
>
>
> Now, if you have a bunch of already existing rows,
> like this:
>
> test=> select * from test;
> info | id
> ------+----
> abc |
> def |
> (2 rows)
>
> then you need to populate those rows id field to put
> in a sequence, and
> that's pretty easy, actually:
>
> est=> update test set id=DEFAULT;
> UPDATE 2
> test=> select * from test;
> info | id
> ------+----
> abc | 1
> def | 2
> (2 rows)
>
> test=>
>
> And there you go!
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
Not using postgres, but try
alter table sales modify salesid serial;
-----Original Message-----
From: Prabu Subroto [mailto:prabu_subroto@yahoo.com]
Sent: Tuesday, July 27, 2004 1:16 PM
To: suse-programming-e(a)suse.com
Subject: [suse-programming-e] altering a table to set serial function
Dear my friends...
I am using postgres 7.4 and SuSE 9.1.
I want to use auto_increment as on MySQL. I look up
the documentation on www.postgres.com and I found
"serial" .
But I don't know how to create auto_increment.
here is my try:
"
kv=# alter table sales alter column salesid int4
serial;
ERROR: syntax error at or near "int4" at character 40
"
Please tell me the correct command to that.
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
--
To unsubscribe, email: suse-programming-e-unsubscribe(a)suse.com
For additional commands, email: suse-programming-e-help(a)suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e
Dear my friends...
I am using SuSE Linux 9.1 and postgres. I am a
beginner in postgres, usually I use MySQL.
I have 3 tables : appointment, appointment0 and
appointment1.
the fields of table "appointment" are as follows:
noapp* (int4):ID Number of appointment (PK)
custid (int4) : Customer ID
salesid (int4) : Sales ID
date (date) : Date of appointment
time (time) : Time of appointment
todo (char(150)) : What's to do with them
done (char(1)): whether done (N/Y)
warned (char(1)): whether warned with prompt
timestamp (timestamp) : timestamp of record
"appointment0" and "appointment1" have exactly the
same field names as what "appointment" has.
But...
1. the population of "appointment0" and "appointment1"
are the subset of "appointment"
2. what the "appointment0" has are the members of
"appointment" whose "Y" as the value of fieldname
"done".
3. and what "appointmnet1" has are the members of
"appointment" whose "N" as the value of fieldname
"done".
I want if my program inserted, updated, deleted the
record of "appointment" than the postgres does the
syncronization to the corresponded tables
(appointment0 or appointment1 or both).
Is it possible to implement this strategy with
trigger? But how?
Where Can I find a good documentation about the
trigger of postgres especially the PLPGSQL of the
postgres?
Anybody would be so nice to tell me the steps and the
command of the triggers should be in order to
implement my strategy? Please....
Please....
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
Dear my friends...
I am using postgres 7.4 and SuSE 9.1.
I want to use auto_increment as on MySQL. I look up
the documentation on www.postgres.com and I found
"serial" .
But I don't know how to create auto_increment.
here is my try:
"
kv=# alter table sales alter column salesid int4
serial;
ERROR: syntax error at or near "int4" at character 40
"
Please tell me the correct command to that.
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
Can't help you with postgres.. You are on your own with that...
There are several ways to get to your result.
A very simplified trigger is below. I left the updating for you to figure
out along with the insert statements.
--------------------------------------------
create or replace trigger [TRIGGER_NAME]
before insert or update or delete on
appointment
for each row
declare
begin
if (inserting)
then
if :new.done = 'Y'
then
[insert into appointment0]
else
[insert into appointment1]
end if;
end if;
if (updating)
then
[Your statements]
end if;
if (deleting)
then
delete from appointment0 where noapp = :old.noapp;
delete from appointment1 where noapp = :old.noapp;
end if;
end;
-----Original Message-----
From: Prabu Subroto [mailto:prabu_subroto@yahoo.com]
Sent: Tuesday, July 27, 2004 7:59 AM
To: suse-programming-e(a)suse.com
Subject: [suse-programming-e] Trigger on Postgres for tables
syncronization
Dear my friends...
I am using SuSE Linux 9.1 and postgres. I am a
beginner in postgres, usually I use MySQL.
I have 3 tables : appointment, appointment0 and
appointment1.
the fields of table "appointment" are as follows:
noapp* (int4):ID Number of appointment (PK)
custid (int4) : Customer ID
salesid (int4) : Sales ID
date (date) : Date of appointment
time (time) : Time of appointment
todo (char(150)) : What's to do with them
done (char(1)): whether done (N/Y)
warned (char(1)): whether warned with prompt
timestamp (timestamp) : timestamp of record
"appointment0" and "appointment1" have exactly the
same field names as what "appointment" has.
But...
1. the population of "appointment0" and "appointment1"
are the subset of "appointment"
2. what the "appointment0" has are the members of
"appointment" whose "Y" as the value of fieldname
"done".
3. and what "appointmnet1" has are the members of
"appointment" whose "N" as the value of fieldname
"done".
I want if my program inserted, updated, deleted the
record of "appointment" than the postgres does the
syncronization to the corresponded tables
(appointment0 or appointment1 or both).
Is it possible to implement this strategy with
trigger? But how?
Where Can I find a good documentation about the
trigger of postgres especially the PLPGSQL of the
postgres?
Anybody would be so nice to tell me the steps and the
command of the triggers should be in order to
implement my strategy? Please....
Please....
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
--
To unsubscribe, email: suse-programming-e-unsubscribe(a)suse.com
For additional commands, email: suse-programming-e-help(a)suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e