[GENERAL] passing long array of integers to dblink remote call

2007-06-27 Thread valgog
Hi everybody, I could not find any information on the passing arrays to the dblink remote call. By now I am using something like: select t.r from dblink( connection_name, 'select r from remote_stored_procedure( ARRAY[' || array_to_string( my_id_array, ',' ) || '] )' ) as t(r text); The construc

[GENERAL] Trouble with Mixed UTF-8 and Latin1 data

2008-02-08 Thread valgog
Hi, we have a 8.2.1 database that has a Latin1 encoding. We managed to write there UTF-8 data (not Latin1) and, as this version of the database, was actually allowing everything to be written to the Latin1 database, by now we have a problem of having data in different encoding on that database. I

Re: [GENERAL] Execute

2008-02-08 Thread valgog
On Feb 5, 9:11 am, "Дикий неадекватный кальмар" <[EMAIL PROTECTED]> wrote: > is there a way to catch error returned by EXECUTE statement? > > declare stmt character varying; > begin > stmt=crate user||'some_name'||' with password '''||'somepassword'; > execute stmt; > > end; > > here i need to know

[GENERAL] Re: passing a temporary table with more than one column to a stored procedure

2008-04-29 Thread valgog
It looks like you need an aggregate function... but aggregate would work in case, you want to return a RECORD and not a SETOF RECORD. In this case, you probably need to operate with arrays. Are you on 8.3? If yes, you would be able to pass an array of type to your function. You can accumulate you

Re: [GENERAL] Is this possible in a trigger?

2008-05-07 Thread valgog
On May 6, 11:05 pm, [EMAIL PROTECTED] (Fernando) wrote: > I want to keep a history of changes on a field in a table.  This will be > the case in multiple tables. > > Can I create a trigger that loops the OLD and NEW values and compares > the values and if they are different creates a change string

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-11 Thread valgog
On Jun 10, 1:58 pm, [EMAIL PROTECTED] (Nikola Milutinovic) wrote: > > You may find that the PGQ component of skytools is what you want: > >  http://pgfoundry.org/projects/skytools > >  http://skytools.projects.postgresql.org/doc/ > >  http://skytools.projects.postgresql.org/doc/pgq-sql.html > > Tha

Re: [GENERAL] "connect by"

2008-06-11 Thread valgog
On Jun 9, 4:54 pm, [EMAIL PROTECTED] ("Roberts, Jon") wrote: > I need a high performing version of Oracle's connect by functionality in > PostgreSQL.  I saw some dispute about attempts to add this in the > archives and a reference to an ANSI alternative "with" statement.  Is > either of these funct

Re: [GENERAL] Multithreaded queue in PgSQL

2008-07-15 Thread valgog
> Whole point is to have multiple services accessing same table and > dividing the work, so locking with waiting for lock to be released is > out of question. > We are doing the same (newsletter) and there is no problem to lock the whole table for a short time with an advisory lock as the java id

Re: [GENERAL] invalid byte sequence for encoding "UNICODE"

2008-07-25 Thread valgog
On Jul 24, 8:06 pm, [EMAIL PROTECTED] (AlannY) wrote: > Hi there. > > Many times, I'm confronting with that strange problem: invalid byte > sequence for encoding "UNICODE". So, I guess, Postgresql can't allow me > to use some symbols which is not a part of UNICODE. But what is that > symbals? > > I

Re: [GENERAL] array_accum() and quoted content

2008-07-29 Thread valgog
On Jul 29, 12:08 am, [EMAIL PROTECTED] (Alvaro Herrera) wrote: > Raymond C. Rodgers escribió: > > > The query in which I'm using array_accum() is building a   > > list of companies and the associated publishers for each. For example: > > > SELECT c.company_id, c.company_name, array_accum(p.publishe