Re: [GENERAL] Postgres 8.0.1 configure failed

2005-06-07 Thread Neil Conway
Dinesh Pandey wrote: ./configure --enable-integer-datetimes --prefix=/usr/local/pgsql --with-tclconfig=/usr/local/lib --with-tcl configure: error: *** Could not execute a simple test program. This may be a problem *** related to locating shared libraries. Check the file 'config.log' *** for t

Re: [GENERAL] blocking INSERTs

2005-06-07 Thread Dennis Bjorklund
On Tue, 7 Jun 2005, Joseph Shraibman wrote: > BEGIN; > SELECT ... FROM table WHERE a = 1 FOR UPDATE; > UPDATE table SET ... WHERE a = 1; > if that resturns zero then > INSERT INTO table (...) VALUES (...); > END; > > The problem is that I need to avoid race conditions. Sometimes I get > primary

Re: [GENERAL] return two elements

2005-06-07 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Hmm, be aware that you can't return a set if you have OUT/INOUT > parameters. ? News to me --- what are you worried about exactly? It's surely possible that our idea of what this means is different from Oracle's, but we ought to take a close look befo

[GENERAL] Postgres 8.0.1 configure failed

2005-06-07 Thread Dinesh Pandey
I am installing postgres 8.0.1 (solaris 9 SPARC), but while configure it is failing. (I have already installed gcc/tcl/tk and tested a simple c program)   ./configure --enable-integer-datetimes --prefix=/usr/local/pgsql --with-tclconfig=/usr/local/lib --with-tcl -

Re: [GENERAL] blocking INSERTs

2005-06-07 Thread Douglas McNaught
Joseph Shraibman writes: > I want to do the following: > > BEGIN; > SELECT ... FROM table WHERE a = 1 FOR UPDATE; > UPDATE table SET ... WHERE a = 1; > if that resturns zero then > INSERT INTO table (...) VALUES (...); > END; > > The problem is that I need to avoid race conditions. Sometimes I g

[GENERAL] blocking INSERTs

2005-06-07 Thread Joseph Shraibman
I want to do the following: BEGIN; SELECT ... FROM table WHERE a = 1 FOR UPDATE; UPDATE table SET ... WHERE a = 1; if that resturns zero then INSERT INTO table (...) VALUES (...); END; The problem is that I need to avoid race conditions. Sometimes I get primary key exceptions on the INSERT.

Re: [GENERAL] To SPAM or not to SPAM...

2005-06-07 Thread Steve Atkins
On Tue, Jun 07, 2005 at 10:56:16PM -0400, Geoffrey wrote: > Wes wrote: > >It seems that for some time this list has been mirrored to Usenet without > >changing the originating email addresses. Since Usenet is spammers > >Nirvana, > >that one little act results in everyone that posts to the postgr

Re: [GENERAL] Things I learned about PG8 on AIX5.3 with XLC compiler

2005-06-07 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Mohan, Ross wrote: >> 2) Not clear (to me, a nonprogrammer) whether this is GNU C, ANSI C, >> "Postgres" C, or what the overall coding protocol is. > Postgres is mostly ANSI C89, with limited use of GNU C extensions (which > should be limited to inside #

Re: [GENERAL] To SPAM or not to SPAM...

2005-06-07 Thread Geoffrey
Wes wrote: It seems that for some time this list has been mirrored to Usenet without changing the originating email addresses. Since Usenet is spammers Nirvana, that one little act results in everyone that posts to the postgres lists becoming SPAM fodder. Can something not be changed in the mai

Re: [GENERAL] pl/pgsql list

2005-06-07 Thread Robert Treat
On Tuesday 07 June 2005 16:16, Bob wrote: > What are the opinions on a separate list just for pl/pgsql? Seems pl/pgsql > deserves her own area. Just wondering if this would make sense, and if it > did can we have a separate list? FWIW, a good number of posts in the pgsql-sql list actually referenc

Re: [GENERAL] pl/pgsql list

2005-06-07 Thread Joshua D. Drake
When the list traffic demands it, perhaps it'll be considered. Until then there's no reason to multiply lists beyond necessity. Even Tom Lane has an upper limit on the number of lists he can read each day. :) Since when? ;) -Doug ---(end of broadcast)---

Re: [GENERAL] postgresql books

2005-06-07 Thread Robert Treat
On Tuesday 07 June 2005 20:43, Jamie Deppeler wrote: > I would recomend Postgresql by Korry and Susan Douglas, I think most > people use this as there resource :) > > I think a new version for postgres 8 is comming out soon > Thanks for that bit of wisdom... however next time if you could leave i

Re: [GENERAL] pl/pgsql list

2005-06-07 Thread Douglas McNaught
Bob <[EMAIL PROTECTED]> writes: > My thought is on it's own pl/pgsql is just as important as straight SQL. > Maybe as time goes on we will see higher volumes of pl/pgsql questions, if > that is what warrants a separate list. I personally don't see why one > would put pl/pgsql in with everything e

Re: [GENERAL] postgresql books

2005-06-07 Thread Jamie Deppeler
I would recomend Postgresql by Korry and Susan Douglas, I think most people use this as there resource :) I think a new version for postgres 8 is comming out soon ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Things I learned about PG8 on AIX5.3 with XLC compiler

2005-06-07 Thread Neil Conway
Mohan, Ross wrote: 1) Many (many!) uninitialized variables in code. Optimizers don't do well with this. Um, what? 2) Not clear (to me, a nonprogrammer) whether this is GNU C, ANSI C, "Postgres" C, or what the overall coding protocol is. Postgres is mostly ANSI C89, with limited use

Re: [GENERAL] pl/pgsql list

2005-06-07 Thread Bob
My thought is on it's own pl/pgsql is just as important as straight SQL. Maybe as time goes on we will see higher volumes of pl/pgsql questions, if that is what warrants a separate list.  I personally don't see why one would put pl/pgsql in with everything else. Maybe because I come from an Oracle

Re: [GENERAL] postgresql books

2005-06-07 Thread Robert Treat
Korry's book is slated for July (hey Korry, send me a review copy eh?) and should expand on his previous book (including info on slony iirc) which was quite good. The newest book currently on the market is Begining Database w/ PostgreSQL, which I did some work on. I thought it was pretty good

Re: [GENERAL] pl/pgsql list

2005-06-07 Thread Chris Browne
[EMAIL PROTECTED] (Bob) writes: > What are the opinions on a separate list just for pl/pgsql?  Seems > pl/pgsql deserves her own area. Just wondering if this would make > sense, and if it did can we have a separate list? I haven't been seeing so much traffic about pl/pgsql that it seems to warrant

[GENERAL] Reliably finding temporary table

2005-06-07 Thread Ian Burrell
We have some functions which need to dynamically create a temporary table if it does not already exist. We use the following function: CREATE OR REPLACE FUNCTION test_date_time_exists() RETURNS BOOLEAN AS ' BEGIN RETURN EXISTS ( SELECT * FROM pg_class WHERE re

[GENERAL] To SPAM or not to SPAM...

2005-06-07 Thread Wes
It seems that for some time this list has been mirrored to Usenet without changing the originating email addresses. Since Usenet is spammers Nirvana, that one little act results in everyone that posts to the postgres lists becoming SPAM fodder. Can something not be changed in the mailinglist-Usne

Re: [GENERAL] Things I learned about PG8 on AIX5.3 with XLC compiler

2005-06-07 Thread Mohan, Ross
:-) LIBPATH=./usr/local/lib:/local/lib:/lib:/usr/lib:/usr/local/pgsql/lib:/home/app/postgresql-8.0.2/src/port While I very much wish I had this little list before I started this, I'd be loathe to consider it the end of the story. I'd say, maybe, "A Small Subset of Helpful Things to Consider"

Re: [GENERAL] pl/pgsql list

2005-06-07 Thread Douglas McNaught
Bob <[EMAIL PROTECTED]> writes: > What are the opinions on a separate list just for pl/pgsql? Seems > pl/pgsql deserves her own area. Just wondering if this would make sense, > and if it did can we have a separate list? I don't think it makes sense--it's not like traffic related to pl/pgsql floo

Re: [GENERAL] db corruption/recovery help

2005-06-07 Thread Ed L.
On Monday June 6 2005 11:15 pm, Tom Lane wrote: > This doesn't really address the question of how the page > header got clobbered in the first place, though.  Did you by > any chance make a dump to see what data was in there? I couldn't start the postmaster at all with that data in the cluster, s

Re: [GENERAL] Postgresql fails to start?

2005-06-07 Thread Tom Lane
Dianne Yumul <[EMAIL PROTECTED]> writes: > I still get the /usr/bin/chcon message but only when I run the command > by hand, even after upgrading coreutils: > # /usr/bin/chcon -u system_u -r object_r -t postgresql_log_t "$PGLOG" > /usr/bin/chcon: can't apply partial context to unlabeled file We

[GENERAL] pl/pgsql list

2005-06-07 Thread Bob
What are the opinions on a separate list just for pl/pgsql?  Seems pl/pgsql deserves her own area. Just wondering if this would make sense, and if it did can we have a separate list?

Re: [GENERAL] Things I learned about PG8 on AIX5.3 with XLC compiler

2005-06-07 Thread Chris Browne
[EMAIL PROTECTED] ("Mohan, Ross") writes: It would be worthwhile to try to formulate this as a patch to the FAQ_AIX file. Probably something like PostgreSQL 8 on AIX 5.3, compiled using VisualAge C -- - Use only default optimization. Highe

Re: [GENERAL] Postgresql fails to start?

2005-06-07 Thread Dianne Yumul
I've seen reports of that before, eg, https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=152931 but it's far from clear why some people see this and some don't. I feel such a goof ball. I searched bugzilla for an hour yesterday but for some reason I did not find that bug. But that solved my p

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Tim Vadnais
Perfect, Thanks so much to all who assisted me. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martijn van Oosterhout Sent: Tuesday, June 07, 2005 10:51 AM To: Scott Marlowe Cc: Jaime Casanova; Tim Vadnais; pgsql-general@postgresql.org; Hackers Subject

[GENERAL] Things I learned about PG8 on AIX5.3 with XLC compiler

2005-06-07 Thread Mohan, Ross
Just a short,terse list: Don't use nondefault optimization. There is something going on with the code that breaks, runtime, when compiled (which works fine per se) with higher optimization levels. IPA is a real difficulty. Remember to set OBJECT_MODE=64 in OS env! upgrading m4/autoconf and t

Re: [GENERAL] Password authentication failed for user

2005-06-07 Thread Michael Fuhr
On Tue, Jun 07, 2005 at 11:17:52AM -0400, Robert Fitzpatrick wrote: > > I have a database that is used every day for the past year and all of a > sudden, this morning, I get a report that a user cannot login. I have > doubled checked the pg_hba.conf file, which has not been changed in > several mon

Re: [GENERAL] Postgresql fails to start?

2005-06-07 Thread Tom Lane
Dianne Yumul <[EMAIL PROTECTED]> writes: > # rm -f pgstartup.log > # /etc/rc.d/init.d/postgresql start > /usr/bin/chcon: can't apply partial context to unlabeled file > /home/postgres/pgstartup.log > Starting postgresql service: [FAILED] > # ps aux | grep postmaster >

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Martijn van Oosterhout
On Tue, Jun 07, 2005 at 12:42:47PM -0500, Scott Marlowe wrote: > On Tue, 2005-06-07 at 12:16, Jaime Casanova wrote: > > I suppose this is because the columns in the except are the same that > > the ones in the main select and the order by get confused. > > > > i'm redirecting to hackers to know if

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Scott Marlowe
On Tue, 2005-06-07 at 12:16, Jaime Casanova wrote: > > SELECT encounter.encounter_id, encounter_d.encounter_d_id > > FROM encounter > > JOIN encounter_d on encounter_d.encounter_id = encounter.encounter_id > > EXCEPT > > SELECT encounter.encounter_id, encounter_d.encounter_d_id > > FROM encounter >

Re: [GENERAL] return two elements

2005-06-07 Thread Alvaro Herrera
On Tue, Jun 07, 2005 at 07:45:03AM -0600, Michael Fuhr wrote: > On Tue, Jun 07, 2005 at 10:08:27AM +0200, "Rodríguez Rodríguez, Pere" wrote: > > > > I suppose that IN/OUT declaration also will use with procedural language > > (PL/pgSQL), it's correct? > > Yes; INOUT is also supported. Hmm, be aw

Re: [GENERAL] locking question - why is this not a deadlock?

2005-06-07 Thread peter royal
On Jun 7, 2005, at 1:15 PM, Alvaro Herrera wrote: I don't think it's a bug, nor a deadlock situation. The problem is the "idle in transaction" server process, which holds some lock but isn't doing anything useful with it. Probably work would continue if the transaction was closed. This view

Re: [GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Jaime Casanova
> SELECT encounter.encounter_id, encounter_d.encounter_d_id > FROM encounter > JOIN encounter_d on encounter_d.encounter_id = encounter.encounter_id > EXCEPT > SELECT encounter.encounter_id, encounter_d.encounter_d_id > FROM encounter > JOIN encounter_d on encounter_d.encounter_id = encounter.enco

Re: [GENERAL] Postgresql fails to start?

2005-06-07 Thread Dianne Yumul
Can you say anything about the difference between the times where it gives the message and the times where it doesn't? I get the message when I remove pgstartup.log before starting postgresql. But if I leave pgstartup.log, it just says it failed to start. Please see output below: # /etc/rc.d

Re: [GENERAL] locking question - why is this not a deadlock?

2005-06-07 Thread Alvaro Herrera
On Tue, Jun 07, 2005 at 10:26:00AM -0400, peter royal wrote: > i am using PostgreSQL 7.4.1 (i am aware of my need to upgrade :) > > i have a situation where i *believe* postgresql should be detecting a > deadlock, but it is not. in the locks view you see below, all of the > processes waiting o

[GENERAL] Issue with adding ORDER BY to EXCEPT.

2005-06-07 Thread Tim Vadnais
Hi all, I've got myself into a vicious loop that I can't seem to get out of. I have paired down the query for debugging this particular problem that I'm having. What I'm trying to do is find all 'encounters' that have no matching record in 'p_l_d' for a date range. My first SELECT pulls all 'en

Re: [GENERAL] Update sql question

2005-06-07 Thread Tom Lane
Don Isgitt <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> BTW, I find the "limit 1" a bit scary --- if there are multiple matches, >> this coding will select a random one of them. Is that really what you >> want? > Ah, quite so. Thank you, Tom and Richard for your spot on help. Tom, I > apprec

Re: [GENERAL] Update sql question

2005-06-07 Thread Don Isgitt
Tom Lane wrote: Don Isgitt <[EMAIL PROTECTED]> writes: gds2=# update master set operator=(select coalesce(newopr,master.operator) from opr_match where state=master.state and oldopr=master.operator limit 1) where state='NM' and operator is not null; I think what you want is gds2=#

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Tom Lane
Phil Endecott <[EMAIL PROTECTED]> writes: > (Incidentally, I have also found that the indexes on my pg_attributes > table were taking up over half a gigabyte, which came down to less than > 40 megs after reindexing them. Is there a case for having autovacuum > also call reindex?) Lots of temp

Re: [GENERAL] Debian Stable goes from Woody to Sarge!!

2005-06-07 Thread Peter Eisentraut
[EMAIL PROTECTED] wrote: > Thanks Oliver for the work you did (I'm assuming) on getting the > Sarge postgreSQL package ready over the various incarnations of > Testing. Martin Pitt maintains the Debian packages of PostgreSQL these days. -- Peter Eisentraut http://developer.postgresql.org/~petere

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Phil Endecott
Matthew T. O'Connor wrote: The integrated version of autovacuum that didn't make the cut before 8.0 avoids this problem since the autovacuum data is stored in the database. What is the status of this? Is it something that will be included in 8.1 or 8.0.n? I might be able to patch the curren

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Bruce Momjian
Phil Endecott wrote: > Matthew T. O'Connor wrote: > > The integrated version > > of autovacuum that didn't make the cut before 8.0 avoids this problem > > since the autovacuum data is stored in the database. > > What is the status of this? Is it something that will be included in > 8.1 or 8.0.

Re: [GENERAL] Postgresql fails to start?

2005-06-07 Thread Dianne Yumul
Um, exactly which Postgres RPMs do you have installed? Thanks for the response. I have the following installed: postgresql-server-8.0.3-1 postgresql-8.0.3-1 postgresql-jdbc-8.0.3-1 postgresql-libs-8.0.3-1 postgresql-devel-8.0.3-1 I downloaded these from the fedora development repository. I use

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Matthew T. O'Connor
Phil Endecott wrote: Matthew T. O'Connor wrote: The integrated version of autovacuum that didn't make the cut before 8.0 avoids this problem since the autovacuum data is stored in the database. What is the status of this? Is it something that will be included in 8.1 or 8.0.n? I might be

[GENERAL] Debian Stable goes from Woody to Sarge!!

2005-06-07 Thread brew
Debian Stable has gone from Woody to Sarge. Hooray! That means the normal package installed goes from 7.2.1 to 7.4.7. Thanks to the folks who told me about backports.org, but I didn't follow through and load it, though. Maybe when backports has 8.x I'll go that route. Thanks Oliver for the wo

[GENERAL] Problem with catching my own exception messages.

2005-06-07 Thread Gorodowienko Daniel
I want to write a function that returns a raise message catched by: EXCEPTION WHEN RAISE_EXCEPTION THEN RETURN . If exception was raise like this: RAISE EXCEPTION 'some exception'; and I want to get 'some exception', so what should I write instead of . ???

[GENERAL] how to loop until eof in a cursor with pgsql

2005-06-07 Thread Thomas Radnetter
hi folks, any idea how to loop through a cursor until it's eof? i'll try to do it this way: declare cursor . (with param) open cursor (param); fetch into record while found ... anything here fetch into record end loop am i right? can not try it at the moment. any suggestio

[GENERAL] Recovery when old WAL segment has been overwritten?

2005-06-07 Thread John Barham
Hi folks, Running 8.0.1 on Linux I got this in my log yesterday morning: LOG: unexpected EOF on client connection LOG: unexpected EOF on client connection LOG: archived transaction log file "0001000A003F" LOG: server process (PID 15318) was terminated by signal 9 LOG: terminating

Re: [GENERAL] Update sql question

2005-06-07 Thread Tom Lane
Don Isgitt <[EMAIL PROTECTED]> writes: > gds2=# update master set operator=(select > coalesce(newopr,master.operator) from opr_match where state=master.state > and oldopr=master.operator limit 1) where state='NM' and operator is not > null; I think what you want is gds2=# update master set ope

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Matthew T. O'Connor
Phil Endecott wrote: Matthew T. O'Connor wrote: Indeed you have. I have head a few similar reports but perhaps none as bad as yours. One person put a small sleep value so that it doesn't spin so tight. You could also just up the sleep delay so that it doesn't do this work quite so often.

Re: [GENERAL] Update sql question

2005-06-07 Thread Richard Huxton
Don Isgitt wrote: gds2=# update master set operator=(select coalesce(newopr,master.operator) from opr_match where state=master.state and oldopr=master.operator limit 1) where state='NM' and operator is not null; What am I doing wrong that gives me the 261 null operator fields after the upd

Re: [GENERAL] pg_dump 8.0.3 failing against PostgreSQL 7.3.2

2005-06-07 Thread Tom Lane
Jochem van Dieten <[EMAIL PROTECTED]> writes: > Tom Lane wrote: > [ light dawns ] You've created a table named "text", haven't you? > Yes, there is such a table. But even if I put the schema with > that table in the search_path I can't reproduce the error from psql. You can if you duplicate pg_

[GENERAL] Password authentication failed for user

2005-06-07 Thread Robert Fitzpatrick
I have a database that is used every day for the past year and all of a sudden, this morning, I get a report that a user cannot login. I have doubled checked the pg_hba.conf file, which has not been changed in several months. But only this one user even after resetting the password, any other user

Re: [GENERAL] pg_dump 8.0.3 failing against PostgreSQL 7.3.2

2005-06-07 Thread Jochem van Dieten
Tom Lane wrote: I wrote: [ light dawns ] You've created a table named "text", haven't you? Yes, there is such a table. But even if I put the schema with that table in the search_path I can't reproduce the error from psql. You need this patch. I prefer the interpretation "My customer n

Re: [GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Tom Lane
Michael Glaesemann <[EMAIL PROTECTED]> writes: > On Jun 7, 2005, at 6:03 PM, Richard Huxton wrote: >> If you ask me (and it's too late to back out now :-) the whole >> behaviour of CHAR(n) is wrong, broken and just a bad idea. > Just a quick addition: AFAIK, this bad, broken behavior (I definite

Re: [GENERAL] Logging query plan for queries

2005-06-07 Thread Bruce Momjian
Himanshu Baweja wrote: > > --- Bruce Momjian wrote: > > > is it possible to log plans for only the queries > > whose > > > duration was more than a particular value or > > something > > > like that... (e.g. log_min_duration_statement) > > > > Sure, see log_min_duration_statement. > > i thin

[GENERAL] Update sql question

2005-06-07 Thread Don Isgitt
Hello, First, software info: gds2=# select version(); version Post

[GENERAL] locking question - why is this not a deadlock?

2005-06-07 Thread peter royal
i am using PostgreSQL 7.4.1 (i am aware of my need to upgrade :) i have a situation where i *believe* postgresql should be detecting a deadlock, but it is not. in the locks view you see below, all of the processes waiting on the 'numberfactory' table are blocked. (which smells like a deadlo

Re: [GENERAL] pg_dump 8.0.3 failing against PostgreSQL 7.3.2

2005-06-07 Thread Tom Lane
I wrote: > [ light dawns ] You've created a table named "text", haven't you? You need this patch. Thanks for the report! regards, tom lane Index: pg_dump.c === RCS file: /cvsroot/pgsql/src/bin/pg_dump/pg_du

Re: [GENERAL] pg_dump 8.0.3 failing against PostgreSQL 7.3.2

2005-06-07 Thread Tom Lane
Jochem van Dieten <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Well, that trace makes it look like it's unhappy about the "null::text" >> in the command, because there is no other typecast in the SELECT target >> statement. > Problem database: >> wedstrijdzeilen=> select * from pg_type where t

Re: [GENERAL] return two elements

2005-06-07 Thread Michael Fuhr
On Tue, Jun 07, 2005 at 10:08:27AM +0200, "Rodríguez Rodríguez, Pere" wrote: > > I suppose that IN/OUT declaration also will use with procedural language > (PL/pgSQL), it's correct? Yes; INOUT is also supported. The following link has examples of PL/pgSQL functions that use OUT: http://develope

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Phil Endecott
Matthew T. O'Connor wrote: Phil Endecott wrote: > Could it be that there is some code in autovacuum that is O(n^2) in > the number of tables? Browsing the code using webcvs, I have found this: for (j = 0; j < PQntuples(res); j++) { tbl_elem = DLGetHead(dbs->table_list); while (tbl_elem

Re: [GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Michael Glaesemann
On Jun 7, 2005, at 6:03 PM, Richard Huxton wrote: If you ask me (and it's too late to back out now :-) the whole behaviour of CHAR(n) is wrong, broken and just a bad idea. Just a quick addition: AFAIK, this bad, broken behavior (I definitely agree!) is per SQL spec. :( Don't know about th

Re: [GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Richard Huxton
Ilja Golshtein wrote: Hi! I came across following difference between "LIKE" and "=" regarding CHARs and VARCHARs create table aa(f5 char(5), fv varchar(5)); insert into aa values('str1', 'str1'); select count(*) from aa where f5 = fv; 1 select count(*) from aa where f5 like fv; 0 I unde

Re: [GENERAL] pg_dump 8.0.3 failing against PostgreSQL 7.3.2

2005-06-07 Thread Jochem van Dieten
Tom Lane wrote: Well, that trace makes it look like it's unhappy about the "null::text" in the command, because there is no other typecast in the SELECT target statement. Looking at the 7.3 code, the only very plausible reason for the failure is if either "unknown" or "text" has disappeared fro

Re: [GENERAL] Logging query plan for queries

2005-06-07 Thread Himanshu Baweja
--- Bruce Momjian wrote: > > is it possible to log plans for only the queries > whose > > duration was more than a particular value or > something > > like that... (e.g. log_min_duration_statement) > > Sure, see log_min_duration_statement. i think bruce u got my question wrong... log_min_du

[GENERAL] CHAR LIKE VARCHAR

2005-06-07 Thread Ilja Golshtein
Hi! I came across following difference between "LIKE" and "=" regarding CHARs and VARCHARs create table aa(f5 char(5), fv varchar(5)); insert into aa values('str1', 'str1'); select count(*) from aa where f5 = fv; > 1 select count(*) from aa where f5 like fv; > 0 I understand trailing spaces in C

Re: [GENERAL] return two elements

2005-06-07 Thread Rodríguez Rodríguez, Pere
Title: RE: [GENERAL] return two elements Ok, :) I suppose that IN/OUT declaration also will use with procedural language (PL/pgSQL), it's correct? -Mensaje original- De: Michael Fuhr [mailto:[EMAIL PROTECTED]] Enviado el: martes 7 de junio de 2005 09:30 Para: Rodríguez Rodríguez,Pe

Re: [GENERAL] return two elements

2005-06-07 Thread Michael Fuhr
On Tue, Jun 07, 2005 at 09:00:28AM +0200, "Rodríguez Rodríguez, Pere" wrote: > > In future releases is planned to incorporate IN/OUT declaration in > parameters of user functions? Yes -- it's already in the development code. http://developer.postgresql.org/docs/postgres/xfunc-sql.html#XFUNC-OUTPU

Re: [GENERAL] return two elements

2005-06-07 Thread Rodríguez Rodríguez, Pere
Title: RE: [GENERAL] return two elements In future releases is planned to incorporate IN/OUT declaration in parameters of user functions? -Mensaje original- De: Tom Lane [mailto:[EMAIL PROTECTED]] Enviado el: lunes 6 de junio de 2005 17:10 Para: "Rodríguez Rodríguez, Pere" CC: pgsql