[BUGS] Inconsistent PHP pg_result_error_field PGSQL_DIAG_SOURCE_FUNCTION across instalations
PHP Script: "; $s = "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r = pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNCTION) . ""; pg_close($c); } if($c = pg_connect("host=192.168.0.60 dbname=xxx user=xxx password=xxx port=5432")) { echo "Successfully connected to PostgreSQL 8.4.2 (installed from package) @ Sun Solaris 10 x86"; $s = "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r = pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNCTION) . ""; pg_close($c); } if($c = pg_connect("host=192.168.0.60 dbname=xxx user=xxx password=xxx port=5431")) { echo "Successfully connected to PostgreSQL 8.5alpha3 (installed from source) @ Sun Solaris 10 x86"; $s = "DROP TABLE t123;"; // table doesn't exist pg_send_query($c, $s); $r = pg_get_result($c); echo "Source function: " . pg_result_error_field($r, PGSQL_DIAG_SOURCE_FUNCTION) . ""; pg_close($c); } ?> ### Output: Successfully connected to PostgreSQL 8.4.2 by Enterprise DB @ Windows Vista x86 Source function: DropErrorMsgNonExistent Successfully connected to PostgreSQL 8.4.2 (installed from package) @ Sun Solaris 10 x86 Source function: Successfully connected to PostgreSQL 8.5alpha3 (installed from source) @ Sun Solaris 10 x86 Source function: DropErrorMsgNonExistent ### Issue: no value returned for 8.4.2 Solaris 10 x86 installation
[BUGS] BUG #5311: Won't install.
The following bug has been logged online: Bug reference: 5311 Logged by: John Email address: jglas...@globaltv.com PostgreSQL version: 8.3.9-1 Operating system: Windows XP Description:Won't install. Details: When I run the installation, I get the following error message. Error occurred executing the microsoft vc++ runtime installer. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #5310: "NOT FOUND" throws "GetData to Procedure return failed." in stored functions
The following bug has been logged online: Bug reference: 5310 Logged by: Lothar Bongartz Email address: lotharbonga...@hotmail.com PostgreSQL version: 8.4 Operating system: Windows XP Professioanl Description:"NOT FOUND" throws "GetData to Procedure return failed." in stored functions Details: A "NOT FOUND" condition in a stored function throws a "GetData to Procedure return failed." error, which cannot be trapped by the EXCEPTION handling. Example: SELECT msg_id INTO v_nm FROM newmail WHERE memb_id=v_id; The only way to avoid the complete failing of the stored function is to do a check before: IF EXISTS (SELECT * FROM newmail WHERE memb_id=v_id) THEN SELECT msg_id INTO v_nm FROM newmail WHERE memb_id=v_id; END IF; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5310: "NOT FOUND" throws "GetData to Procedure return failed." in stored functions
2010/2/3 Lothar Bongartz : > > The following bug has been logged online: > > Bug reference: 5310 > Logged by: Lothar Bongartz > Email address: lotharbonga...@hotmail.com > PostgreSQL version: 8.4 > Operating system: Windows XP Professioanl > Description: "NOT FOUND" throws "GetData to Procedure return failed." > in stored functions > Details: > > A "NOT FOUND" condition in a stored function throws a "GetData to Procedure > return failed." error, which cannot be trapped by the EXCEPTION handling. > Example: what I know SELECT INTO doesn't raise exception. postgres=# create table t(a int); CREATE TABLE Time: 6,632 ms postgres=# create function f() returns int as $$declare _a int; begin select a into _a from t where a = 10; return _a; end; $$ language plpgsql; CREATE FUNCTION Time: 113,988 ms postgres=# select f(); f --- (1 row) you have to use SELECT INTO STRICT when you would not found exception postgres=# create or replace function f() returns int as $$declare _a int; begin select a into strict _a from t where a = 10; return _a; end; $$ language plpgsql; CREATE FUNCTION Time: 18,734 ms postgres=# select f(); ERROR: query returned no rows CONTEXT: PL/pgSQL function "f" line 1 at SQL statement postgres=# regards Pavel Stehule > > SELECT msg_id INTO v_nm FROM newmail WHERE memb_id=v_id; > > The only way to avoid the complete failing of the stored function is to do a > check before: > > IF EXISTS (SELECT * FROM newmail WHERE memb_id=v_id) THEN > SELECT msg_id INTO v_nm FROM newmail WHERE memb_id=v_id; > END IF; > > -- > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-bugs > -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5310: "NOT FOUND" throws "GetData to Procedure return failed." in stored functions
"Lothar Bongartz" writes: > A "NOT FOUND" condition in a stored function throws a "GetData to Procedure > return failed." error, which cannot be trapped by the EXCEPTION handling. There is no such error message text anywhere in Postgres, and you haven't given enough context to let anyone guess what the complaint actually is about. Please show a *complete* example not a one-line extract. The expected behavior of the command you show is to set the INTO variable(s) to NULL if there is no matching row. That isn't an error though. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Hi Pavel, and Chris, Thank you both your yours responses. Here is what I read from the officiel manual : http://www.postgresql.org/docs/8.0/static/sql-syntax.html stating that : ".. Identifier and key word names are case insensitive..." This is not the truth at all and I think that this statement must be corrected in the manual regarding the below observation ; And thus this may save many hours of search for many readers who get stuck at this point. Here is my test using psql : # create table *Foo*(*Nom* integer); CREATE TABLE # \dt Liste des relations Schéma | Nom | Type | Propriétaire ++---+-- public | *foo * | table | postgres (1 lignes) # select * from FOO; *nom * - (0 ligne) # select * from "Foo"; ERREUR: la relation « Foo » n'existe pas LIGNE 1 : select * from "Foo" In this example, I have executed a CREATE statement with identifiers names including some uppercases and typed without double quotes. I would like much to have those identifiers displayed as wished in the CREATE statement for easy and friendly reading. But what I can notice is that Postgresql does this when double quotes are not used : All identifiers are lowercased in all sql statements before those are executed. To prevent the 'lowercasing', the identifiers must be double quoted in DML and SELECT queries. In my opinion, I would suggest to put int the official manual the following note : "Key word names are case insensitive, but identifiers names are always case sensitive. If uppercases are wanted in the identifiers, those identifiers must be double quoted in all sql statements. In order to make the identifiers behave as 'case insensitive' in sql statement, the identifiers must not be double quoted or must be lowercased." My suggestion in the major release of Postgresql : A new parameter in Postgresql configuration file, (e.g.: queryident_ci = Yes[|No]). This parameter would tell postgresql if the identifiers are case sensitive or case insensitive (default). If the default mode is used, the result would be that : # create table *Foo*(*Nom* integer); CREATE TABLE # \dt Liste des relations Schéma | Nom | Type | Propriétaire ++---+-- public | *Foo * | table | postgres (1 lignes) # select * from *foo*; *Nom * - (0 ligne) This is much more friendly to read and easy in making queries without the tricky constraint of using the double quotes. I have this friendly behavior in MS SQL Server. And I have seen many people complaining regarding the current behavior in my google searches. So, Hope this suggestion will be observed in future release... Very best regards, Kelly 2010/2/2 Pavel Stehule > Hello, > > usually sql identifiers are case insensitive. There are exception. If > you use double quotes for sql identifier, then you have to write exact > same identifier everywhere. > > postgres=# create table Foo(a integer); > CREATE TABLE > Time: 174,078 ms > postgres=# select * from Foo; > a > --- > (0 rows) > > Time: 33,255 ms > postgres=# select * from foo; > a > --- > (0 rows) > > Time: 0,822 ms > postgres=# drop table foo; > DROP TABLE > Time: 34,945 ms > postgres=# create table "Foo"(a integer); > CREATE TABLE > Time: 3,225 ms > postgres=# select * from foo; > ERROR: relation "foo" does not exist > LINE 1: select * from foo; > ^ > postgres=# select * from Foo; > ERROR: relation "foo" does not exist > LINE 1: select * from Foo; > ^ > postgres=# select * from "Foo"; > a > --- > (0 rows) > > Time: 1,277 ms > > you cannot change this behave. Just don't use double quotes in create > statement. > > Regards > Pavel Stehule > > > > 2010/2/2 Kelly SACAULT : > > > > The following bug has been logged online: > > > > Bug reference: 5308 > > Logged by: Kelly SACAULT > > Email address: kelly.saca...@gmail.com > > PostgreSQL version: 8.4.2 > > Operating system: Ubuntu 9.10 > > Description:How to disable Case sensitivity on naming identifiers > > Details: > > > > I have installed Postgresql using Ubuntu Synaptic. > > > > In the contrary of what is stated in the official manual, I have to write > > case sensitive SQL statements in my postgresql connexion. > > > > What parameter do I have to change in the postgresaql configuration ? I > have > > spent many hours in studying the parameters, the faqs and the forums. I > have > > found nothing to make my SQL statements case-insensitive. > > I want to be able to execute successfully such stmts: > > > > SELECT col1 FROM myTABLE > > > > SELECT Col1 FROM myTable > > > > please, may you help ? > > > > Kelly > > > > -- > > Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgsql-bugs > > >
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
On Wed, Feb 3, 2010 at 2:13 PM, Kelly SACAULT wrote: > Here is what I read from the officiel manual : > http://www.postgresql.org/docs/8.0/static/sql-syntax.html > > stating that : > ".. Identifier and key word names are case insensitive..." > > This is not the truth at all and I think that this statement must be > corrected in the manual regarding the below observation It's completely true. Identifiers are most definitely case-insensitive, unless of course you quote them. This is documented on the very same web page you just quoted, a little far down: Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case. For example, the identifiers FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" and "FOO" are different from these three and each other. (The folding of unquoted names to lower case in PostgreSQL is incompatible with the SQL standard, which says that unquoted names should be folded to upper case. Thus, foo should be equivalent to "FOO" not "foo" according to the standard. If you want to write portable applications you are advised to always quote a particular name or never quote it.) You may not like the current behavior (that's up to you), but I don't believe there's any problem with how it's documented. ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
On Wed, Feb 3, 2010 at 11:30 AM, Robert Haas wrote: > Quoting an identifier also makes it case-sensitive, whereas unquoted > names are always folded to lower case. For example, the identifiers > FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" > and "FOO" are different from these three and each other. (The folding > of unquoted names to lower case in PostgreSQL is incompatible with the > SQL standard, which says that unquoted names should be folded to upper > case. Thus, foo should be equivalent to "FOO" not "foo" according to > the standard. If you want to write portable applications you are > advised to always quote a particular name or never quote it.) > > You may not like the current behavior (that's up to you), but I don't > believe there's any problem with how it's documented. There might actually be two reasons to document the folding-to-lower though: 1) The SQL standards mandate folding to upper instead, so this is a deviation from the standard (a good one IMO), but it might be useful to highlight it for the reader esp. since it will hit those trying to support multiple databases. 2) While I doubt that too many people get stuck on that (I did for all of 30 seconds), more clarity might be helpful for individuals just starting to pick up PostgreSQL. I don't like the proposed wording though. I would suggest something more like: "Unless double-quoted, all identifiers are folded to lower case, making comparisons generally case insensitive. The SQL standard mandates folding identifiers to upper case, but the consensus among the PostgreSQL development team is that folding to lower case is better. If double-quotes are not used ever, or are used consistently throughout the application, this poses no compatibility problems in terms of SQL queries." -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Kelly SACAULT writes: > Here is what I read from the officiel manual : > http://www.postgresql.org/docs/8.0/static/sql-syntax.html > stating that : > ".. Identifier and key word names are case insensitive..." You need to not stop reading at that point, but continue on to the part that explains how quoted identifiers work. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
On Wed, Feb 3, 2010 at 11:37 AM, Tom Lane wrote: > Kelly SACAULT writes: >> Here is what I read from the officiel manual : >> http://www.postgresql.org/docs/8.0/static/sql-syntax.html >> stating that : >> ".. Identifier and key word names are case insensitive..." > > You need to not stop reading at that point, but continue on to the part > that explains how quoted identifiers work. The only issue here (not a major one, maybe not even worth fixing, but probably worth mentioning) is that the discussion of case folding is more than a screen away and that it isn't immediately clear that there is more discussion. It is probably understandable that some people would miss it (I did, a moment ago, until you mentioned it). A simple (see below) might be a good idea. Then again it might be a good thing for someone else (not generally engrossed in development on the project) to submit a patch for :-) Best Wishes, Chris Travers -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Chris Travers writes: > On Wed, Feb 3, 2010 at 11:37 AM, Tom Lane wrote: >> Kelly SACAULT writes: >>> ".. Identifier and key word names are case insensitive..." >> >> You need to not stop reading at that point, but continue on to the part >> that explains how quoted identifiers work. > The only issue here (not a major one, maybe not even worth fixing, but > probably worth mentioning) is that the discussion of case folding is > more than a screen away and that it isn't immediately clear that there > is more discussion. It is probably understandable that some people > would miss it (I did, a moment ago, until you mentioned it). A simple > (see below) might be a good idea. Or we could rephrase, perhaps "Key words and unquoted identifiers are case insensitive..." which would at least cue people that there's more to learn. We can't try to explain every detail in the first sentence though. > Then again it might be a good > thing for someone else (not generally engrossed in development on the > project) to submit a patch for :-) Yeah ... those of us who've already learned this stuff are probably not able to see it with a novice's eyes. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Chris Travers wrote: > It is probably understandable that some people > would miss it (I did, a moment ago, until you mentioned it). That seems like pretty good evidence that a footnote or qualification of the initial statement would occasionally save some confusion. -Kevin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Tom Lane wrote: > "Key words and unquoted identifiers are case insensitive..." FWIW, that is the *exact* rewording that came to mind for me as a possible solution. -Kevin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
On Wed, Feb 3, 2010 at 2:36 PM, Chris Travers wrote: > I don't like the proposed wording though. I would suggest something more > like: Just to be clear, that's the actual wording, not a proposal. ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session
On Mon, Feb 1, 2010 at 11:28 AM, Cristian wrote: > > The following bug has been logged online: > > Bug reference: 5305 > Logged by: Cristian > Email address: cbit...@gmail.com > PostgreSQL version: 8.3.9 > Operating system: Windows 2003 Server Standard x64 > Description: Postgres service stops when closing Windows session > Details: > > We connect to Windows server using the Terminal Services Clients (mstsc), > and performs maintenance task with pgAdmin 3. > > PostgreSQL service crashes when the user close session on Windows, and the > following error is recorded in the pg_log files: > > > > LOG: server process (PID 5200) exited with exit code 128 > > LOG: terminating any other active server processes > > WARNING: terminating connection because of crash of another server process > > DETAIL: The postmaster has commanded this server process to roll back the > current transaction and exit, because another server process exited > abnormally and possibly corrupted shared memory. > > HINT: In a moment you should be able to reconnect to the database and > repeat your command. .. > > > > The server has the following specs: > > Windows 2003 SP2 Standard 64-bit, 4GB, NOT joined to a domain. > > PostgreSQL 8.3.9 > > pgAdmin 3 > > We connect without the /console parameter. > > > Any ideas? So you're saying that if pgadmin is open when you close the terminal services session, the SERVER crashes? Did you somehow start the server in that same session, or is the server running as a service? ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Robert Haas wrote: > On Wed, Feb 3, 2010 at 2:36 PM, Chris Travers wrote: > > I don't like the proposed wording though. ?I would suggest something more > > like: > > Just to be clear, that's the actual wording, not a proposal. I found one place in the docs where this wasn't immediately clear, so I applied the attached documentation patch. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: doc/src/sgml/syntax.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v retrieving revision 1.139 diff -c -c -r1.139 syntax.sgml *** doc/src/sgml/syntax.sgml 15 Dec 2009 17:57:46 - 1.139 --- doc/src/sgml/syntax.sgml 3 Feb 2010 22:42:38 - *** *** 144,150 case sensitivity of SQL commands ! Identifier and key word names are case insensitive. Therefore: UPDATE MY_TABLE SET A = 5; --- 144,150 case sensitivity of SQL commands ! Unquoted identifier and key word names are case insensitive. Therefore: UPDATE MY_TABLE SET A = 5; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Bruce Momjian escribió: > I found one place in the docs where this wasn't immediately clear, so I > applied the attached documentation patch. I liked Tom's suggestion better, because then you don't start questioning about quoting key words or not. > --- 144,150 >case sensitivity >of SQL commands > > ! Unquoted identifier and key word names are case insensitive. Therefore: > > UPDATE MY_TABLE SET A = 5; > -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Alvaro Herrera writes: > Bruce Momjian escribió: >> I found one place in the docs where this wasn't immediately clear, so I >> applied the attached documentation patch. > I liked Tom's suggestion better, because then you don't start > questioning about quoting key words or not. Yes, exactly, that was why I changed the ordering. I had always thought that the reference to "names" of keywords was a bit off-key, too. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5308: How to disable Case sensitivity on naming identifiers
Tom Lane wrote: > Alvaro Herrera writes: > > Bruce Momjian escribi?: > >> I found one place in the docs where this wasn't immediately clear, so I > >> applied the attached documentation patch. > > > I liked Tom's suggestion better, because then you don't start > > questioning about quoting key words or not. > > Yes, exactly, that was why I changed the ordering. I had always thought > that the reference to "names" of keywords was a bit off-key, too. Yea, I like Tom's wording better too. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #5312: I NEED HELP
The following bug has been logged online: Bug reference: 5312 Logged by: Dan Baldev Email address: dbal...@msn.com PostgreSQL version: 8.4 Operating system: Windows Vista Description:I NEED HELP Details: I USE POSTGRES AND I AM A LAYMAN. I HAVE TRIED LOOKING EVERYWHERE TO FIX MY ISSUE BUT EVERYTHING LOOKS LIKE FOREIGN LANGUAGE TO ME. I CAN'T FIGURE OUT HOW TO FIX MY PROBLEM. I USE A PARTICULAR SOFTWARE TO ACCESS A DATABASE. MYSTERIOUSLY, MY SOFTWARE'S DATABASE MANAGER SHOWS 2 DATABASES. ONE OF THEM IS THE ONE I CREATED. THE OTHER IS CALLED "INSTESTDB" AND I'VE NEVER SEEN IT BEFORE. I AM SCARED SOMEONE HAS HACKED INTO MY COMPUTER. PLEASE HELP!!! I AM GOING CRAZY TRYING TO DELETE THAT DATABASE AND MAKE SURE EVERYTHING IS OK. THANK YOU-DAN BALDEV -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5312: I NEED HELP
On Wed, Feb 3, 2010 at 9:32 PM, Dan Baldev wrote: > > The following bug has been logged online: > > Bug reference: 5312 > Logged by: Dan Baldev > Email address: dbal...@msn.com > PostgreSQL version: 8.4 > Operating system: Windows Vista > Description: I NEED HELP > Details: > > I USE POSTGRES AND I AM A LAYMAN. I HAVE TRIED LOOKING EVERYWHERE TO FIX MY > ISSUE BUT EVERYTHING LOOKS LIKE FOREIGN LANGUAGE TO ME. I CAN'T FIGURE OUT > HOW TO FIX MY PROBLEM. > > I USE A PARTICULAR SOFTWARE TO ACCESS A DATABASE. MYSTERIOUSLY, MY > SOFTWARE'S DATABASE MANAGER SHOWS 2 DATABASES. ONE OF THEM IS THE ONE I > CREATED. THE OTHER IS CALLED "INSTESTDB" AND I'VE NEVER SEEN IT BEFORE. I > AM SCARED SOMEONE HAS HACKED INTO MY COMPUTER. > > PLEASE HELP!!! I AM GOING CRAZY TRYING TO DELETE THAT DATABASE AND MAKE SURE > EVERYTHING IS OK. > > THANK YOU-DAN BALDEV I'm really sorry you're having trouble - but unfortunately you haven't provided any information that would let someone help you. Please see: http://wiki.postgresql.org/wiki/Guide_to_reporting_problems Also, this is a list for reporting bugs, and your problem doesn't sound much like a bug. You might want to try posting (with quite a lot more details, and perhaps not in all upper case) to pgsql-novice or pgsql-general. ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5312: I NEED HELP
All I want to do is to delete a database, but I don't know how to actually input the dropdb command and what other stuff I need to open...can you help? I think my problem will be very simple for someone who understands this -- From: "Robert Haas" Sent: Wednesday, February 03, 2010 9:38 PM To: "Dan Baldev" Cc: Subject: Re: [BUGS] BUG #5312: I NEED HELP On Wed, Feb 3, 2010 at 9:32 PM, Dan Baldev wrote: The following bug has been logged online: Bug reference: 5312 Logged by: Dan Baldev Email address: dbal...@msn.com PostgreSQL version: 8.4 Operating system: Windows Vista Description:I NEED HELP Details: I USE POSTGRES AND I AM A LAYMAN. I HAVE TRIED LOOKING EVERYWHERE TO FIX MY ISSUE BUT EVERYTHING LOOKS LIKE FOREIGN LANGUAGE TO ME. I CAN'T FIGURE OUT HOW TO FIX MY PROBLEM. I USE A PARTICULAR SOFTWARE TO ACCESS A DATABASE. MYSTERIOUSLY, MY SOFTWARE'S DATABASE MANAGER SHOWS 2 DATABASES. ONE OF THEM IS THE ONE I CREATED. THE OTHER IS CALLED "INSTESTDB" AND I'VE NEVER SEEN IT BEFORE. I AM SCARED SOMEONE HAS HACKED INTO MY COMPUTER. PLEASE HELP!!! I AM GOING CRAZY TRYING TO DELETE THAT DATABASE AND MAKE SURE EVERYTHING IS OK. THANK YOU-DAN BALDEV I'm really sorry you're having trouble - but unfortunately you haven't provided any information that would let someone help you. Please see: http://wiki.postgresql.org/wiki/Guide_to_reporting_problems Also, this is a list for reporting bugs, and your problem doesn't sound much like a bug. You might want to try posting (with quite a lot more details, and perhaps not in all upper case) to pgsql-novice or pgsql-general. ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5312: I NEED HELP
On Wed, Feb 3, 2010 at 9:46 PM, Daniel J. Baldev wrote: > All I want to do is to delete a database, but I don't know how to actually > input the dropdb command and what other stuff I need to open...can you help? > I think my problem will be very simple for someone who understands this I probably could help if I could see what is on your screen, but I can't. In general, if the database you want to drop is called junk, then you either do "dropdb junk" from the command line or "DROP DATABASE junk" from SQL. Once again, you need to read the guide to reporting problems - you're not providing any information at all on what program you're using to connect to the database, what you've tried, what happened, etc. And again, this is not a bug. ...Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5304: psql using conninfo fails in connecting to the server
On 02/02/2010 10:23 PM, Tom Lane wrote: > Joe Conway writes: >> Should I also be looking to replace all (or most) other instances of >> PQsetdbLogin()? > > I think we at least wanted to fix pg_dump(all)/pg_restore. Not sure if > the others are worth troubling over. OK, this one includes pg_dump(all)/pg_restore and common.c from bin/scripts (createdb, vacuumdb, etc). I still need to adjust the docs, but other than that any remaining complaints? Joe Index: src/bin/pg_dump/pg_backup_db.c === RCS file: /opt/src/cvs/pgsql/src/bin/pg_dump/pg_backup_db.c,v retrieving revision 1.85 diff -c -r1.85 pg_backup_db.c *** src/bin/pg_dump/pg_backup_db.c 14 Dec 2009 00:39:11 - 1.85 --- src/bin/pg_dump/pg_backup_db.c 4 Feb 2010 03:57:42 - *** *** 154,163 do { new_pass = false; ! newConn = PQsetdbLogin(PQhost(AH->connection), PQport(AH->connection), ! NULL, NULL, newdb, ! newuser, password); if (!newConn) die_horribly(AH, modulename, "failed to reconnect to database\n"); --- 154,187 do { + #define PARAMS_ARRAY_SIZE 7 + const char **keywords = malloc(PARAMS_ARRAY_SIZE * sizeof(*keywords)); + const char **values = malloc(PARAMS_ARRAY_SIZE * sizeof(*values)); + + if (!keywords || !values) + die_horribly(AH, modulename, "out of memory\n"); + + keywords[0] = "host"; + values[0] = PQhost(AH->connection); + keywords[1] = "port"; + values[1] = PQport(AH->connection); + keywords[2] = "user"; + values[2] = newuser; + keywords[3] = "password"; + values[3] = password; + keywords[4] = "dbname"; + values[4] = newdb; + keywords[5] = "fallback_application_name"; + values[5] = progname; + keywords[6] = NULL; + values[6] = NULL; + new_pass = false; ! newConn = PQconnectdbParams(keywords, values, true); ! ! free(keywords); ! free(values); ! if (!newConn) die_horribly(AH, modulename, "failed to reconnect to database\n"); *** *** 237,245 */ do { new_pass = false; ! AH->connection = PQsetdbLogin(pghost, pgport, NULL, NULL, ! dbname, username, password); if (!AH->connection) die_horribly(AH, modulename, "failed to connect to database\n"); --- 261,293 */ do { + #define PARAMS_ARRAY_SIZE 7 + const char **keywords = malloc(PARAMS_ARRAY_SIZE * sizeof(*keywords)); + const char **values = malloc(PARAMS_ARRAY_SIZE * sizeof(*values)); + + if (!keywords || !values) + die_horribly(AH, modulename, "out of memory\n"); + + keywords[0] = "host"; + values[0] = pghost; + keywords[1] = "port"; + values[1] = pgport; + keywords[2] = "user"; + values[2] = username; + keywords[3] = "password"; + values[3] = password; + keywords[4] = "dbname"; + values[4] = dbname; + keywords[5] = "fallback_application_name"; + values[5] = progname; + keywords[6] = NULL; + values[6] = NULL; + new_pass = false; ! AH->connection = PQconnectdbParams(keywords, values, true); ! ! free(keywords); ! free(values); if (!AH->connection) die_horribly(AH, modulename, "failed to connect to database\n"); *** *** 697,699 --- 745,748 else return false; } + Index: src/bin/pg_dump/pg_dumpall.c === RCS file: /opt/src/cvs/pgsql/src/bin/pg_dump/pg_dumpall.c,v retrieving revision 1.131 diff -c -r1.131 pg_dumpall.c *** src/bin/pg_dump/pg_dumpall.c 6 Jan 2010 03:34:41 - 1.131 --- src/bin/pg_dump/pg_dumpall.c 4 Feb 2010 03:55:45 - *** *** 1618,1625 */ do { new_pass = false; ! conn = PQsetdbLogin(pghost, pgport, NULL, NULL, dbname, pguser, password); if (!conn) { --- 1618,1653 */ do { + #define PARAMS_ARRAY_SIZE 7 + const char **keywords = malloc(PARAMS_ARRAY_SIZE * sizeof(*keywords)); + const char **values = malloc(PARAMS_ARRAY_SIZE * sizeof(*values)); + + if (!keywords || !values) + { + fprintf(stderr, _("%s: out of memory\n"), progname); + exit(1); + } + + keywords[0] = "host"; + values[0] = pghost; + keywords[1] = "port"; + values[1] = pgport; + keywords[2] = "user"; + values[2] = pguser; + keywords[3] = "password"; + values[3] = password; + keywords[4] = "dbname"; + values[4] = dbname; + keywords[5] = "fallback_application_name"; + values[5] = progname; + keywords[6] = NULL; + values[6] = NULL; + new_pass = false; ! conn = PQconnectdbParams(keywords, values, true); ! ! free(keywords); ! free(values); if (!conn) { Index: src/bin/psql/command.c === RCS file: /opt/src/cvs/pgsql/src/bin/psql/command.c,v retrieving revision 1.213 diff -c -r1.213 command.c *** src/bin/psql/command.c 2 Jan 2010 16:57:59 - 1.213 --- src/bin/psql/command.c 4 Feb 2010 01:18:34 -