On Mon, Jul 21, 2008 at 6:07 PM, Tom Lane <[EMAIL PROTECTED]> wrote:
> "Scott Marlowe" <[EMAIL PROTECTED]> writes:
>> OK, I'm getting the above error on one of my fairly new 8.3 production
>> databases. It happens when I run a query to see the size of my
>> tables.
>
>> SELECT pg_relation_size(c.r
Scott Marlowe escribió:
> OK, I'm getting the above error on one of my fairly new 8.3 production
> databases. It happens when I run a query to see the size of my
> tables.
>
> SELECT pg_relation_size(c.relfilenode), n.nspname AS schemaname,
> c.relname AS tablename, pg_get_userbyid(c.relowner) AS
"Scott Marlowe" <[EMAIL PROTECTED]> writes:
> OK, I'm getting the above error on one of my fairly new 8.3 production
> databases. It happens when I run a query to see the size of my
> tables.
> SELECT pg_relation_size(c.relfilenode),
Pretty sure that should be c.oid.
reg
OK, I'm getting the above error on one of my fairly new 8.3 production
databases. It happens when I run a query to see the size of my
tables.
SELECT pg_relation_size(c.relfilenode), n.nspname AS schemaname,
c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner,
t.spcname AS tablespace
Francisco Reyes wrote:
On 4:05 pm 07/21/08 Jack Orenstein <[EMAIL PROTECTED]> wrote:
What if we do a binary copy instead?
What do you mean by a binary copy?
pg_dump -Fc?
No, I mean changing this:
psql -h $SOURCE_HOST ... -c "copy $SOURCE_SCHEMA.$SOURCE_TABLE to stdout" |\
psql ...
Hello list!
I'll try to keep this short, if any more info is needed just ask.
I have a program that is supposed to parse standard log files
and act on specific lines.
It mostly does what it's supposed to, but if I run it a couple
of time, using the same input data, some of the results differ.
On 4:05 pm 07/21/08 Jack Orenstein <[EMAIL PROTECTED]> wrote:
> We will now be adding 8.3.x databases to the mix, and will need to
> copy between 7.4.x and 8.3.x in both directions. The datatypes we use
I believe it should work.
Also, one feature I believe started in the 8.X line (8.2?), is the ab
We have a set of 7.4.x databases, and will occasionally copy data between like
so:
psql -h $SOURCE_HOST ... -c "copy $SOURCE_SCHEMA.$SOURCE_TABLE to stdout" |\
psql ... -c "copy $TARGET_SCHEMA.$TARGET_TABLE from stdin"
This is always run on the host containing the target table.
We will
Jerry McRae wrote:
I am having a problem with the simplest of Python functions, so I must be
doing something wrong. After hours of searching and trying many options, I
need the key that my puny brain is missing here.
I cannot pass parameters to a plpythonu function. I have tried within psql
an
A B wrote:
I have a table with rows like this
A 1
A 1
B 3
B 3
C 44
C 44
and so on.
and I want it to be
A 1
B 3
C 44
so how can I remove the all the duplicate lines but one?
CREATE TEMP TABLE tmp AS SELECT DISTINCT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 AS SELECT * FROM tmp;
--
Sent via
On Mon, Jul 21, 2008 at 9:51 AM, A B <[EMAIL PROTECTED]> wrote:
>> There is probably a more elegant way of doing it, but a simple way of doing
>> it ( depending on the size of the table ) could be:
>>
>> begin;
>>
>> insert into foo select distinct * from orig_table;
>> delete from orig_table;
>>
Yes, here foo is a temp table. As others have pointed out, you could
probably do a create table foo as select distinct * from orig_table. I
would move the data back to orig_table, so that constraints and
privileges are maintainited. After you have done this, you can put a
uniq constraint on col
On Mon, Jul 21, 2008 at 5:00 AM, priyaa <[EMAIL PROTECTED]> wrote:
>
> i am using postgresql instead of mysql ,but while execute i am getting error
> like
>
>
> Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
> org.springframework.dao.InvalidDataAccessResourceUsageException: coul
hubert depesz lubaczewski <[EMAIL PROTECTED]> write:
> http://www.postgresql.org/docs/faqs.FAQ.html#item4.4
That's not what I'm looking for. I want the size limit defined
for the varchar field not the max size the database system can
handle, e.g. if the field is varchar(4) I want the 4.
--
Sen
>On Sun, Jul 20, 2008 at 05:50:30PM -0500, Martin wrote:
>> Ok, this should be simple. How do I find the defined maximum
>> length of a varchar field?
SELECT
character_maximum_length
FROM
information_schema.columns
WHERE
table_schema = 'name_of_your_schema' and
table_name = 'name_o
> There is probably a more elegant way of doing it, but a simple way of doing
> it ( depending on the size of the table ) could be:
>
> begin;
>
> insert into foo select distinct * from orig_table;
> delete from orig_table;
> insert into orig_table select * from foo;
>
> commit;
Just to make it c
On 11:33 am 07/21/08 "A B" <[EMAIL PROTECTED]> wrote:
> and I want it to be
> A 1
> B 3
> C 44
The slow way
select distinct field1, field2 from sometable.
The faster way
select field1,fields2 from sometable group by field1, field2.
Distinct should in theory be the same speed, but on several test
There is probably a more elegant way of doing it, but a simple way of
doing it ( depending on the size of the table ) could be:
begin;
insert into foo select distinct * from orig_table;
delete from orig_table;
insert into orig_table select * from foo;
commit;
-Said
A B wrote:
I have a ta
On 21/07/2008 16:33, A B wrote:
I have a table with rows like this
A 1
A 1
B 3
B 3
C 44
C 44
and so on.
and I want it to be
A 1
B 3
C 44
so how can I remove the all the duplicate lines but one?
You could copy them into a new table, like so:
CREATE TABLE newtable AS
SELECT DISTINCT * FROM old
I have a table with rows like this
A 1
A 1
B 3
B 3
C 44
C 44
and so on.
and I want it to be
A 1
B 3
C 44
so how can I remove the all the duplicate lines but one?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org
priyaa wrote:
i am using postgresql instead of mysql ,but while execute i am getting error
like
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not
execute query; nested exception is
org.hibernate.excepti
Hey,
> > They are all under 200 million
>
> Weird
>
> Could you fetch from pg_stat_activity the table it's processing, and its
> pg_class row and that of its toast table (if any)?
Sorry for the delay. Required details are at
http://pastebin.com/pastebin.php?dl=fd699fbb
Let me know if you need
On Sun, Jul 20, 2008 at 05:50:30PM -0500, Martin wrote:
> Ok, this should be simple. How do I find the defined maximum
> length of a varchar field?
http://www.postgresql.org/docs/faqs.FAQ.html#item4.4
depesz
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes t
am Mon, dem 21.07.2008, um 9:40:19 +0200 mailte Torsten Zühlsdorff folgendes:
> A. Kretschmer schrieb:
>
> >>if I have a table, the_table, with a DATE field, i'll call it 'day', and
> >>I'd like to find all rows whos day falls within a given month, which of
> >>the following methods is faster/
I am having a problem with the simplest of Python functions, so I must be
doing something wrong. After hours of searching and trying many options, I
need the key that my puny brain is missing here.
I cannot pass parameters to a plpythonu function. I have tried within psql
and with pgAdmin III (w
A. Kretschmer schrieb:
if I have a table, the_table, with a DATE field, i'll call it 'day', and
I'd like to find all rows whos day falls within a given month, which of the
following methods is faster/costs less:
1.
SELECT * FROM the_table WHERE day LIKE '2008-01-%';
2.
i am using postgresql instead of mysql ,but while execute i am getting error
like
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
org.springframework.dao.InvalidDataAccessResourceUsageException: could not
execute query; nested exception is
org.hibernate.exception.SQLGrammarEx
Yes, I use a Microsoft Visual Studio compiler, but the full version - not
Express Edition. Just in case I quote the code again ( it's short):
--
include "postgres.h"
#include "fmgr.h"
#include "executor/executor.h"
#include "uti
el dorado wrote:
Hello.
Thank you very much for your answer.
1>d:\pgsql83\getstring\c_getstring.c(10) : warning C4273: 'Pg_magic_func' :
inconsistent dll linkage
1>d:\pgsql83\getstring\c_getstring.c(10) : see previous definition of
'Pg_magic_func'
This should be a big red fla
Hello.
Thank you very much for your answer.
I found an option "Configuration Properties\C/C++/General/Detect 64-bit
Portability Issues". It was set to 'Yes'. I made it 'No'.
Now I don't get these warnings about 'type cast'.
The result:
1>Compiling...
1>getstring.c
1>d:\pgsql83\getstring\
30 matches
Mail list logo