Hannu Krosing wrote:
On Thu, 2009-01-22 at 02:33 +0300, Igor Katson wrote:
So to say, give me the list of friends (not only their ID's, but all the
needed columns!) of given individual, which are in a given group. That
seems ok without plproxy, but with using it, I can't imagine how can I
Hello!
Question is what's the easiest way to implement conditional execution
of insert/update-s via psql interface?
As far as I know there's following options:
1) create function in procedural language (plpgsql, for example);
then call that function
2) update ... where ; insert ... (select ... whe
Hi,
I am running a Chinese edition of XP. When I start psql, it is probably
trying to display Chinese and
maybe it gets the encoding wrong, it displays garbage in its console. Is
there any way to tell it to
just use English instead? In Linux, one can do something like "LC_ALL=en
psql" but it do
On Thursday 22 January 2009 09:36:53 Kent Tong wrote:
> Hi,
>
> I am running a Chinese edition of XP. When I start psql, it is probably
> trying to display Chinese and
> maybe it gets the encoding wrong, it displays garbage in its console. Is
> there any way to tell it to
> just use English instead
Reg Me Please wrote:
>
> psql --help ?
>
which option you're referring to? I tried --locale but it had no effect.
-
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
--
View this mess
On 22/01/2009 07:15, Abdul Rahman wrote:
> Your solution of using ps command is for Linux but I am using WinXp.
> That is why it confused me.
No problem! :-) It occurred to me after I sent the email that you might
not be on Linux
It's a good idea, when posting questions, to include as much b
Please don't top post.
paulo matadr wrote:
>>> My aplication return erro:
>>>
>>> 2009-01-20 10:22:03,264 INFO [STDOUT] Caused by: org.postgresql.util.
>>> PSQLException: ERROR: invalid memory alloc request size 1705447581
>>
>> What are you doing in terms of SQL?
>> INSERT, UPDATE, DELETE?
>>
On Thursday 22 January 2009 10:04:58 Kent Tong wrote:
> Reg Me Please wrote:
> > psql --help ?
>
> which option you're referring to? I tried --locale but it had no effect.
>
>
> -
> --
> Kent Tong
> Wicket tutorials freely available at http://www.agileskills2.org/EWDW
> Axis2 tutorials freely a
Reg Me Please wrote:
>
> Weel, you have two locales: one on the client and one the server.
> The former is needed for "translations" to the server whenver the two
> don't
> match.
> The latter is chosen at the CREATE DATABASE ENCODING .
>
I am referring to the locale on the client that dete
Hi,
I just literally trashed my test server with one delete statement
because the psql used up all its memory and started to swap like crazy.
my delete looked like this
DELETE FROM table_foo WHERE bar_id IN (SELECT DISTINCT bar_id FROM bar
LEFT JOIN ... LEFT JOIN ... LEFT JOIN WHERE table.
Clemens Schwaighofer wrote:
> Hi,
>
> I just literally trashed my test server with one delete statement
> because the psql used up all its memory and started to swap like crazy.
>
> my delete looked like this
>
> DELETE FROM table_foo WHERE bar_id IN (SELECT DISTINCT bar_id FROM bar
> LEFT JOIN
try making it in two steps,using temp table maybe.
how many rows does the subselect generate ?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 1/22/09, Igor Katson wrote:
> Hannu Krosing wrote:
> > On Thu, 2009-01-22 at 02:33 +0300, Igor Katson wrote:
> >
> >
> >> So to say, give me the list of friends (not only their ID's, but all the
> >> needed columns!) of given individual, which are in a given group. That
> >> seems ok with
On Thursday 22 January 2009 10:51:41 Kent Tong wrote:
> Reg Me Please wrote:
> > Weel, you have two locales: one on the client and one the server.
> > The former is needed for "translations" to the server whenver the two
> > don't
> > match.
> > The latter is chosen at the CREATE DATABASE ENCODING
Marko Kreen wrote:
On 1/22/09, Igor Katson wrote:
Hannu Krosing wrote:
> On Thu, 2009-01-22 at 02:33 +0300, Igor Katson wrote:
>
>
>> So to say, give me the list of friends (not only their ID's, but all the
>> needed columns!) of given individual, which are in a given group. That
>> se
I think identified the problem
lts's check log below:
Query:
SELECTSTATEMENT: select relatorios0_.fuin_id as fuin5_1_, relatorios0_.rege_id
as rege1_1_, relatorios0_.rege_id as r
ege1_624_0_,
relatorios0_.rege_tmultimaalteracao as rege2_624_0_,
relatorios0_.rege_nnpaginas
as rege3_624_0_, rel
checkpoints don't have anything to do with it.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
test2=# create table dupa(a timestamp, b serial);
NOTICE: CREATE TABLE will create implicit sequence "dupa_b_seq" for
serial column "dupa.b"
CREATE TABLE
test2=# insert into dupa(a) select current_timestamp from
generate_series(1,100);
INSERT 0 100
test2=# insert into dupa(a) select 'current_ti
On Thu, 2009-01-22 at 15:10 +0300, Igor Katson wrote:
> Ok, thank you, guys. What is the best way to make an array out of a
> column? I didn't make up anything better then writing a function:
>
> CREATE OR REPLACE FUNCTION int_column_to_array(query text) RETURNS int[]
> AS $$
> DECLARE
>
Hannu Krosing wrote:
On Thu, 2009-01-22 at 15:10 +0300, Igor Katson wrote:
Ok, thank you, guys. What is the best way to make an array out of a
column? I didn't make up anything better then writing a function:
CREATE OR REPLACE FUNCTION int_column_to_array(query text) RETURNS int[]
AS $$
On Thu, 2009-01-22 at 16:13 +0200, Hannu Krosing wrote:
> On Thu, 2009-01-22 at 15:10 +0300, Igor Katson wrote:
>
> > Ok, thank you, guys. What is the best way to make an array out of a
> > column? I didn't make up anything better then writing a function:
> >
> > CREATE OR REPLACE FUNCTION int_c
Hannu Krosing wrote:
On Thu, 2009-01-22 at 16:13 +0200, Hannu Krosing wrote:
On Thu, 2009-01-22 at 15:10 +0300, Igor Katson wrote:
Ok, thank you, guys. What is the best way to make an array out of a
column? I didn't make up anything better then writing a function:
CREATE OR REPLACE F
> I don't see why it would
This may reduce I/O activity and reduce the vacuum activity on this
table.
Here a small example:
insert into update_test select * from generate_series (1,10)
vacuum full verbose update_test
-> INFO: "update_test": found 0 removable, 10 nonremovable row
versi
Reg Me Please wrote:
>
> In general, refer to "8.13.2. Encoding Handling" and "Chapter 22.
> Localization" on v8.3.5 documentation.
>
Thanks for your replies. However, as I said before, I am asking for the
locale controlling the text
prompts printed by psql. I've read the chapter you quoted b
Kent Tong wrote:
> I am referring to the locale on the client that determines the text prompts
> it outputs.
I think "Reg me Please" got you wrong, here's the answer:
To set the locale for server messages, set the server configuration
parameter "lc_messages" to the appropriate value.
You can ei
On 22/01/2009 13:52, Grzegorz Jaśkiewicz wrote:
> test2=# insert into dupa(a) select 'current_timestamp' from
> generate_series(1,100);
> ERROR: date/time value "current" is no longer supported
This doesn't answer your question, but you use current_timestamp without
the quotes, thus -
insert
Please don't top post.
paulo matadr wrote:
> I think identified the problem
> lts's check log below:
>
> Query:
> SELECTSTATEMENT: select relatorios0_.fuin_id as fuin5_1_,
> relatorios0_.rege_id as rege1_1_, relatorios0_.rege_id as r
> ege1_624_0_, relatorios0_.rege_tmultimaalteracao as rege2_6
Grzegorz Jaśkiewicz escribió:
> test2=# insert into dupa(a) select 'current_timestamp' from
> generate_series(1,100);
> ERROR: date/time value "current" is no longer supported
> LINE 1: insert into dupa(a) select 'current_timestamp' from generate...
>^
> test2=
On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
> Grzegorz Jaśkiewicz escribió:
> > test2=# insert into dupa(a) select 'current_timestamp' from
> > generate_series(1,100);
> > ERROR: date/time value "current" is no longer supported
> > LINE 1: insert into dupa(a) select 'current_times
Adrian Klaver wrote:
On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
Grzegorz Jaśkiewicz escribió:
test2=# insert into dupa(a) select 'current_timestamp' from
generate_series(1,100);
ERROR: date/time value "current" is no longer supported
LINE 1: insert into dupa(a) select
On Thursday 22 January 2009 9:07:37 am Jason Long wrote:
> Adrian Klaver wrote:
> > On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
> >> Grzegorz Jaśkiewicz escribió:
> >>> test2=# insert into dupa(a) select 'current_timestamp' from
> >>> generate_series(1,100);
> >>> ERROR: date/time
well, I am asking that - for pure curiosity reason.
I got a function in C, that automagically puts all data in quotes, and
that's how I came across that strange difference between current_time
and now(). Funny enough, pg will translate first one to latter in
domains, for instance.
--
Sent via pgs
I have a database which was created as LATIN1 (the machine has the
wrong locales installed when I set up PG). It is running 8.3.
So I found various places which said the way to do this was to do
a pg_dumpall -f dump_file, get rid of the entire database, init_db -E UTF-8,
and then psql -f dumpfi
2009/1/22, Adrian Klaver :
> On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
>> Grzegorz Jaśkiewicz escribió:
>> > test2=# insert into dupa(a) select 'current_timestamp' from
>> > generate_series(1,100);
>> > ERROR: date/time value "current" is no longer supported
>> > LINE 1: insert
On Thursday 22 January 2009 18:57:16 Osvaldo Kussama wrote:
> 2009/1/22, Adrian Klaver :
> > On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
> >> Grzegorz Jaśkiewicz escribió:
> >> > test2=# insert into dupa(a) select 'current_timestamp' from
> >> > generate_series(1,100);
> >> > ERROR
Adrian Klaver escribió:
> At least on 8.2 'now()' does not work either at least not in the way I think
> you want. I get:
>
> test=# SELECT 'now()';
> ?column?
> --
> now()
> (1 row)
alvherre=# select 'now()'::unknown::timestamptz;
timestamptz
On Thursday 22 January 2009 10:04:05 am Alvaro Herrera wrote:
> Adrian Klaver escribió:
> > At least on 8.2 'now()' does not work either at least not in the way I
> > think you want. I get:
> >
> > test=# SELECT 'now()';
> > ?column?
> > --
> > now()
> > (1 row)
>
> alvherre=# select 'no
Postgres 8.1.11
I'm getting an error when trying to drop a primary key from a table
because of foreign key constraints. This is OK, not worried about
that. I am worried that I can't duplicate the problem in a DB created
from a backup of my primary DB.
The error happens in my primary production
On Wed, Jan 21, 2009 at 10:15 AM, Albe Laurenz wrote:
>
> Tom Lane suggested in
> http://archives.postgresql.org/pgsql-general/2004-02/msg00471.php
> that it might be better to set shared_buffers "relatively
> small" and let the filesystem cache do the buffering, so that's
> another way you can go
> Is there a definative HOWTO that I can follow, if not does someone
> have a set of instructions that will work?
What about running "iconv" command on the dumped .sql file and transform
it to the utf8?
Vlad
PS: man iconv for manual
--
Sent via pgsql-general mailing list (pgsql-general@postgre
On Thursday 22 January 2009, Vladimir Konrad wrote:
> > Is there a definative HOWTO that I can follow, if not does someone
> > have a set of instructions that will work?
>
> What about running "iconv" command on the dumped .sql file and transform
> it to the utf8?
>
> Vlad
>
> PS: man iconv for man
> iconv does not change the database encodings embedded in the file
> (and it is quite large).
Have you read the manual?
file A pathname of an input file. If no file operands are
specified, or if a file operand is '-', the standard input shall
be used.
cat the-source-dump
On Thursday 22 January 2009, Vladimir Konrad wrote:
> > iconv does not change the database encodings embedded in the file
> > (and it is quite large).
>
> Have you read the manual?
>
>file A pathname of an input file. If no file operands are
>specified, or if a file operand is '-
On Thursday 22 January 2009, Vladimir Konrad wrote:
> > iconv does not change the database encodings embedded in the file
> > (and it is quite large).
>
> Have you read the manual?
>
>file A pathname of an input file. If no file operands are
>specified, or if a file operand is '-'
> You have not understood what I said. I ran iconv, and it changes the
> encoding of the data, but not the ENCODING= statements that are
> embedded in the datastream. Yes I can change those with sed, but
> I do not know what else I need to change. There must be an easier
> way.
Oops, please a
On Thursday 22 January 2009, David Goodenough
wrote:
>
> You have not understood what I said. I ran iconv, and it changes the
> encoding of the data, but not the ENCODING= statements that are
> embedded in the datastream. Yes I can change those with sed, but
> I do not know what else I need to
Alan Hodgson wrote:
Yeah it does. iconv buffers everything in memory, as I recall.
However, you can "split" the file into manageable pieces, run each
through
iconv, and recombine afterwards.
Another way is to just use GNU recode for large files instead of iconv.
It's slower but do
> > cat the-source-dump.sql | iconv -t utf8 - > my-converted.sql
> >
> > Size should not matter in this case...
>
> Yeah it does. iconv buffers everything in memory, as I recall.
Just found an alternative - "uconv" command (part of ICU project):
http://www.icu-project.org/userguide/intro.html
I've a table that contain a tsvector that is indexed (gin) and
triggers to update the tsvector that should then update the index.
This gin index has always been problematic. Recreation and updates
were very slow.
Now I had to update 1M rows of that table but for columns
that doesn't involve the t
On 01/22/2009 07:11 PM, Richard Huxton wrote:
> Clemens Schwaighofer wrote:
>> Hi,
>>
>> I just literally trashed my test server with one delete statement
>> because the psql used up all its memory and started to swap like crazy.
>>
>> my delete looked like this
>>
>> DELETE FROM table_foo WHERE ba
On 01/22/2009 07:19 PM, Grzegorz Jaśkiewicz wrote:
> try making it in two steps,using temp table maybe.
> how many rows does the subselect generate ?
the subselect returns 57.000 rows.
--
[ Clemens Schwaighofer -=:~ ]
[ IT Engineer/Web Producer/Planning/Manager
On Wed, Jan 21, 2009 at 9:36 AM, Herouth Maoz wrote:
> I have a test machine - but the data in there is test data, and it's a
> slower machine. A testing environment is good for development, but can
> hardly be used to really simulate the production machine for performance.
>
What the other poste
Hi y'all,
I've been experiencing segfaults of PostgreSQL for quite a quite now
(since July 2008, PostgreSQL 8.3.3, perhaps?) on a FreeBSD 7 PowerPC
(7400) system (not sure if anyone really cares about this particular
platform, but I'll try :-)):
internal# gdb postgres postgres.core
GNU gdb 6
Nick Withers writes:
> I've been experiencing segfaults of PostgreSQL for quite a quite now
> (since July 2008, PostgreSQL 8.3.3, perhaps?) on a FreeBSD 7 PowerPC
> (7400) system (not sure if anyone really cares about this particular
> platform, but I'll try :-)):
Hmm, is this query accessing a t
On Thu, 2009-01-22 at 23:42 -0500, Tom Lane wrote:
> Nick Withers writes:
> > I've been experiencing segfaults of PostgreSQL for quite a quite now
> > (since July 2008, PostgreSQL 8.3.3, perhaps?) on a FreeBSD 7 PowerPC
> > (7400) system (not sure if anyone really cares about this particular
> > p
55 matches
Mail list logo