Folks,
would you like help me how to query this case.
I have tbl_a, the fields are :
item_record
item_product_name
item_qty
if the data are :
item_record = 1,2,3,4,5,6
item_product_name = a,b,a,c,d,c,...
item_qty = 10,5,15,10,20,5,...
How the query to sum item_qty_total if i want the result :
* [EMAIL PROTECTED] (Richard Susanto) wrote:
|
| Folks,
| would you like help me how to query this case.
|
| I have tbl_a, the fields are :
| item_record
| item_product_name
| item_qty
|
|
| if the data are :
|
| item_record = 1,2,3,4,5,6
| item_product_name = a,b,a,c,d,c,...
| item_qty =
I read and have seen that when a table has more than 1GB it is divided
in several files with the names of inode,inode.1,inode.2,inode.3, etc.
I have a table of 1.3 GB (9.618.118 rows,13 fields) it is divided in
that way as i see on /PGDATA/base but each file has the same size i
mean
table inode
On Thu, Aug 25, 2005 at 08:52:35 -0400,
jose fuenmayor [EMAIL PROTECTED] wrote:
The size of the table is 3 times bigger than, for instance Visual Fox
Pro dbf's? since is there fisically three times.
Have you been vacuuming properly? It is possible you have a lot of dead
tuples in the
I have a question regarding blocking locks in the pg database. I ran into a
process which terminated abnormally, and to fully clear the locks it left
behind I had to reboot the system (probably restarting postmaster would have
had the same effect). This was a personal development system so this
On Thu, Aug 25, 2005 at 18:44:00 +0700,
Richard Susanto [EMAIL PROTECTED] wrote:
Folks,
would you like help me how to query this case.
This question is off topic for the pgsql-admin list, it should have been
asked on the pgsql-sql list because it was a question about SQL. (I probably
wouldn't
Hi Chris,
If you're running VACUUM often enough, then there's nothing wrong, and
nothing to be done. You're simply observing how PostgreSQL handles
large tables.
Wrong. I have a big table - running VACUUM the first time needs as long
as I run it after the VACUUM has finished. There are
'k, I've been wracking my brains over this today, and I'm either
mis-understanding what is being reported *or* its reporting wrong ...
According to syslog:
LOG: duration: 4107.987 ms statement: UPDATE session SET hit_time=now() WHERE
md5='8b8e7b7ff9b1b2ed5fc60218ced28d00';
But, if I do
As I know EXPLAIN ANALYZE runs the query. I think you are just running
the query two times. The first time you run the query it will take a
long time to be processed - after the first run the query planner will
remember the best way to run the query so your second run runs much faster.
I can
On Thu, 25 Aug 2005, Aldor wrote:
As I know EXPLAIN ANALYZE runs the query. I think you are just running the
query two times. The first time you run the query it will take a long time to
be processed - after the first run the query planner will remember the best
way to run the query so your
On Thu, Aug 25, 2005 at 03:56:36PM -0300, Marc G. Fournier wrote:
On Thu, 25 Aug 2005, Aldor wrote:
I'm still wondering why you first query takes about 4107.987 ms - this
kind of query has usually have to run much much faster.
That would work if I were to get really occasional high values
On Thu, Aug 25, 2005 at 01:55:08PM -0600, Michael Fuhr wrote:
Are the updates happening inside a transaction? Is it possible
that they're being blocked by other transactions that update the
same record around the same time and don't commit immediately?
I can duplicate the results you're
I am having a problem with the rule system in 7.3.4.
I have a view with an on insert do instead rule that is calling a
function and passing new.*. When try to insert a row into the view, I
get ERROR: ResolveNew: can't handle whole-tuple reference.
I was working with this in 8.0 on an RD
This is kind of a pg-admin newbie question, so apologies in advance.
Anyway, I'd like to issue a command that dumps the results of a query to
a txt file in comma delimited format. Does PostgreSQL ship with
something to do this? I searched the web, but found what appeared to be
non-free
David,
You're probably looking for something like this from the psql man page:
-F separator
--field-separator separator
Use separator as the field separator. This is equivalent to
\pset fieldsep or \f.
I would guess -F , would do the trick.
On
Greetings,
There is no direct way to achieve what you want, the easiest hack is
to create a temp table with you query i.e.
create table tmp_foo as select col1, col4, col7 from table1, table2
where ;
copy table tmp_foo to [stdout|file_name]
HTH
Adi Alurkar
[EMAIL PROTECTED]
On Aug
Whoops, should have also mentioned that you want -P format=unaligned like so:
psql -P format=unaligned -F ',' snort EOF
select * from iphdr;
EOF
On Thu, 25 Aug 2005, Jeff Frost wrote:
David,
You're probably looking for something like this from the psql man page:
-F separator
On Thu, Aug 25, 2005 at 03:48:54PM -0700, Adi Alurkar wrote:
Greetings,
There is no direct way to achieve what you want, the easiest hack is
to create a temp table with you query i.e.
create table tmp_foo as select col1, col4, col7 from table1, table2
where ;
copy table tmp_foo
In the Makefile for pgcrypto there's a cryptsrc variable you can set to
'builtin' or 'system'.
Makefile only references the variable when it's set to 'builtin'... I
can't figure out what it's supposed to do when set to 'system'.
Anyone happen to know?
Thanks,
Colin
Aug 25 14:53:32 forgehouse-s1 postgres[23721]: [2-1] LOG: duration:
567.559 ms statement: UPDATE session SET hit_time=now() WHERE
md5='7537b74eab488de54d6e0167d1919207';
Aug 25 14:53:32 forgehouse-s1 postgres[23722]: [2-1] LOG: duration:
565.966 ms statement: UPDATE session SET
On Thursday 25 August 2005 3:24 pm, David Durham wrote:
This is kind of a pg-admin newbie question, so apologies in
advance.
Anyway, I'd like to issue a command that dumps the results of a
query to a txt file in comma delimited format. Does PostgreSQL
ship with something to do this? I
I can't figure out how to change the port of the pgcrypto regression
tests... I see how to change it in the regress.sh file, but, I can't
figure out how to invoke it with that option... make has never been a
forte of mine.
I mean... couldn't you just use ant? :)
Colin
Found the PGPORT variable.
But is there a way to invoke the tests with a different port from the
command line?
Colin E. Freas wrote:
I can't figure out how to change the port of the pgcrypto regression
tests... I see how to change it in the regress.sh file, but, I can't
figure out how
On Fri, Aug 26, 2005 at 12:50:29AM +0100, Aldor wrote:
Aug 25 14:53:32 forgehouse-s1 postgres[23721]: [2-1] LOG: duration:
567.559 ms statement: UPDATE session SET hit_time=now() WHERE
md5='7537b74eab488de54d6e0167d1919207';
Aug 25 14:53:32 forgehouse-s1 postgres[23722]: [2-1] LOG:
On Thu, 25 Aug 2005, Michael Fuhr wrote:
On Fri, Aug 26, 2005 at 12:50:29AM +0100, Aldor wrote:
Aug 25 14:53:32 forgehouse-s1 postgres[23721]: [2-1] LOG: duration:
567.559 ms statement: UPDATE session SET hit_time=now() WHERE
md5='7537b74eab488de54d6e0167d1919207';
Aug 25 14:53:32
On Thu, Aug 25, 2005 at 08:21:11PM -0400, Colin E. Freas wrote:
Found the PGPORT variable.
But is there a way to invoke the tests with a different port from the
command line?
You should be able to set variables like PGPORT, PGUSER, PGHOST,
etc., on make's command line:
make PGPORT=12345
This is kind of a pg-admin newbie question, so apologies in advance.
Anyway, I'd like to issue a command that dumps the results of a query to
a txt file in comma delimited format. Does PostgreSQL ship with
something to do this? I searched the web, but found what appeared to be
non-free
Hi,
few days ago we made vacuum of all databases on our server. After that
we canot dump databases:
# pg_dumpall -i -U postgres test.sql
pg_dump: query to obtain list of schemas failed: ERROR: More than one
tuple returned by a subselect used as an expression.
pg_dumpall: pg_dump failed on
Hi,
I want to have Postgres use an SSL certificate for secure access by
clients over the internet. I have a server that runs PostgreSQL and I
have created my own Certificate Authority. I now have a certificate and
corresponding private key in /etc/ssl. This pair is used without
problems by:
-
Hemapriya wrote:
Hi,
I would like to know how to connect to postgres from
shell scripts using a password protected user.
psql is the simple way.
Is there a way to embed the password in psql login.
It keeps prompting for the passwords.
Use the .pgpass file to store the password.
Hi,
Anyone pls. help me. I have a postgres installation package for Mac
OS X.
After installation, Can i use my own user for configuring postgres,
instead of creating a postgres user.
Also how can I run it on different port, instead of the default port
(5432).
And lastly how can I
Hello,
We have upgraded our PostgreSQL database version from
7.3.1 (Cygwin) under Windows 2000 server to v8.03 for windows.
Now we dumped our database (app. size 6 GB) with
PgAdmin III with success. The problem now is that we cant completely restore
our database with the dump file.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi all,
I'm trying to create the rpm for these distributions,
I'm using the one available for RH9.0 but I got:
On RH7.3, RH7.2 and AS2.1 I get:
# rpmbuild --rebuild postgresql-8.0.3-1PGDG.src.rpm
[...]
checking for perl... /usr/bin/perl
checking for
33 matches
Mail list logo