Why can't I write a whole text in CAPS?
PostgreSQL database development
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > PostgreSQL database developmentGo to page: « previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:
Tuesday, 22 July 2008
Recordset problem Jean-Baptiste ESTIVAL 21:38:53
 Hello,
I can't use recordset.addnew in VB6 with postgreodbc
the current connection is OK, the recordset is opened as dynamic, like the exemple given on the odbc site.
So, if anyone have a solution,
Regards,
JiB
comment 14 answers | Add comment
Tuesday, 1 July 2008
Is there an ODBC driver available for Windows 2003 64-bit Regina Obe 09:31:32
 I'm moivng over SQL Server 2000 32-bit databases over to SQL Server 2005 64-bit and ran into a small problem.

In the old setup, I had a linked server configuration to a Postgresql server which used the 32-bit driver. In the new setup, the SQL Server 2005 64-bit can't see the 32-bit drivers (unless I run in 32-bit mode) and I don't think its possible for it to since its runing in 64-bit SQL Server. So I'm guessing I need to get a 64-bit PostGreSQL ODBC driver, somehow get the pgsql .NET driver to be seen as an option, or possibly the 32-bit.

Thanks,
Regina







-------------------­--------------------­--
The substance of this message, including any attachments, may be
confidential, legally
privileged and/or exempt from disclosure pursuant to Massachusetts
law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and
delete the material from any computer.
comment 1 answer | Add comment
Saturday, 21 June 2008
phpPgAdmin on Debian Sarge John Hedge 08:34:11
 Hi,

Can someone point me at a 'howto' install phpPgAdmin from the point where
I've apt-get install phpPgAdmin and dependencies (Apache etc.), please?

All I get for http://192.168.3.22­/phpPgAdmin/index.ph­p is:

Not Found

The requested URL /phpPgAdmin/index.p­hp was not found on this server.
-------------------­-----------
Apache/2.0.55 (Debian) Server at 192.168.3.22 Port 80
TIA

John
comment 1 answer | Add comment
Tuesday, 17 June 2008
error codes in postgresql Sandhya 19:32:12
 

Hi,

I want to know ,if there is any way to return error codes/numbers as a return value from the postgresql functions.
For ex:

If i am using my connection function say,
DbConnect(dname,una­me,.........)
{
//here i use postgres connection function
pg_conn *conn;
conninfo="dbname=ex­ample(dname) user=postgres(uname­)";
conn=PQConnectdb(co­nninfo)
//After connecting i need to create a table..and if the table exists
PQerrormessage(conn­) will return error message...
But what i need is ..
Is there any other way of returning error number to my main program.
Can you please tell me how to handle these errors in my application.
I referred posgresql site..I didn't get any clear idea of it.
Any help please......

Thank you...
Regards,
Sandhya R

comment 7 answers | Add comment
Saturday, 24 May 2008
Really stupid question(?) Bear Giles 12:05:58
 I've been giving a lot of thought to some of the questions raised
by my SSL patch, and have both a conclusion and a really stupid
question.

First, the conclusion is that what I'm working on is "secure sessions."
As I mentioned before, that's not just encryption (e.g., SSH tunnels),
but the combination of confidentiality (encryption), message integrity
and endpoint authentication. This is what people think you mean when
you say an application "supports" Kerberos or SSL, and it's what's
required for really sensitive information.

(E.g., nobody cares that the data was encrypted if the confidential
information supporting a search warrant went to the bad guys instead
of directly to the central police database. The snitch is still
dead, and the evidence destroyed.)

The latest SSL patches will be out by this weekend, and I hope to
add GSS-API (which includes Kerberos 5) soon afterwards. Both will
publish their endpoint authentication information (X509 structure
and strings containing subject and issuer distinguished names, string
containing Kerberos principal name), and the HBA code can then use
this information for PostgreSQL authentication.

...

The really stupid question refers to some of the hardcoded fallback
values in this code. The reason for having hardcoded values is to
prevent "downgrade" attacks - you don't want to casually override the
DBA, but you also don't want to make it easy for a knowledgeable
attacker to fatally compromise the system in a way that your average
DBA couldn't catch.

But the problem is that knowledgeable security administrators can
replace the common hardcoded values with their own. How do you allow
this to be easily done?

One possibility that occured to me was that dynamic libraries would
handle this nicely. There's even some support for dynamic libraries
in the user-defined functions, so this wouldn't be a totally
unprecedented idea.

But this would be a new way of using dynamic libraries. Is this
something everyone is comfortable with, or is it problematic for
some reason? Or is this premature - maybe the first release should
just use hardcoded values with a note to contact individuals if
there's an interest in a dynamic library approach?

Bear

-------------------­--------(end of broadcast)---------­------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHer­e" to majordomo@postgresq­l.org)

comment 8 answers | Add comment
Monday, 5 May 2008
Multilingual Support Nandha Kumar 09:32:22
 hi,
Does PostgreSQL support Multilingual data?
Is it possible to have rows in different languages like japanese etc?

nandha kumar & prasad


-------------------­--------(end of broadcast)---------­------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgres­ql.org/docs/faqs/FAQ­.html

comment 2 answer | Add comment
Tuesday, 6 November 2007
updating Angelo Rigo 21:33:48
 Hi

I am working on an update php script, i have a list of the records and at
the bottom of the script i do write the id number
on the id field i want to change and the others fields values, i have to
write it, i want to select with a radio button and to get the fields at
the bottom receiving the values of that line i do select how can i do that?


Below is my script:
//part one: list and update form.

<?php
$db = pg_connect("dbname=­db user=user");
$query = "SELECT * FROM thetable";

$result = pg_exec($db, $query);
if (!$result) {printf ("ERROR"); exit;}
$numrows = pg_numrows($result)­;
$row=0;

printf ("<table border=1>
");

printf ("<tr bgcolor='#66CCFF'><­td><b>ID</b></td><td­><b>Cidade</b></td><­td><b>Estado</b></td­><td><b>Local</b></t­d><td><b>Dia</b></td­><td><b>MГЄs</b></td­><td><b>HorГЎrio</b>­</td><td><b>Evento</­b></td></tr>");
do
{
$myrow = pg_fetch_array ($result,$row);
printf ("<tr bgcolor='$bgcolor'>­<td>%s</td><td>%s</t­d><td>%s</td><td>%s<­/td><td>%s</td><td>%­s</td><td>%s</td><td­>%s</td></tr>
",$myrow[id],$myrow[cidade], $myrow[estado], $myrow[localidade],$myrow[dia],
$myrow[mes], $myrow[horario],$myrow[evento]);
$row++;
}
while ($row < $numrows);
printf ("</table><br>
");
pg_close($db);
?>

<form action="atual.php" method="post">
<TABLE>
<TR><TD>ID to modificar :</TD>
<TD><input type="text" name="id" size="4" length="4" value="id"></TD>
</TR>
<TR><TD>Cidade : </TD>
<TD><input type="text" name="cidade" size="80" length="80" value=""></TD>
</TR>
<TR><TD>Estado :</TD>
<TD><input type="text" name="estado" size="80" length="80" value=""></TD>
</TR>
<TR>
<TD>Local :</TD>
<TD><input type="text" name="local" size="80" length="80" value=""></TD>
</TR>
<TR>
<TD>Dia : </TD>
<TD><input type="text" name="data" size="80" length="80" value=""></TD>
</TR>
<TR>
<TD>MГЄs :</TD>
<TD><input type="text" name="data" size="80" length="80" value=""></TD>
</TR>
<TR>
<TD>HorГЎrio :</TD>
<TD><input type="text" name="horario" size="80" length="80" value=""></TD>
</TR>
<TR>
<TD>Evento :</TD>
<TD><input type="text" name="evento" size="80" length="80" value=""></TD>
</TR>
<TR>
<TD><input type="submit" name="submit" value="Atualizar"><­/TD>
<TD><input type="reset" name="reset" value="Limpar"></TD­>
</TR>
</TABLE>



// atual .php

<?php
$db = pg_connect("dbname=­db user=puser");
$query = "UPDATE thetable SET $id='$id', cidade='$cidade', estado='$estado',
localidade='$locali­dade', dia='$dia', mes='$mes', horario='$horario',­ evento='$evento'
WHERE id='$id'";
$result = pg_exec($db, $query);
if (!$result) {printf ("ERROR"); exit;}
printf ("these values were updated: %s %s %s %s %s %s %s %s", $id, $cidade,
$estado, $localidade, $dia, $mes, $horario, $evento);
pg_close($db);
?>


___________________­____________________­_
A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com­.br.



-------------------­--------(end of broadcast)---------­------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgres­ql.org/users-lounge/­docs/faq.html

comment 2 answer | Add comment
Saturday, 27 October 2007
build error Darko Prenosil 00:35:30
 Yesterdays snapshot fails to build on my NT:

gcc -O2 -fno-strict-aliasin­g -Wall -Wmissing-prototype­s -Wmissing-declarati­o
ns -I../../src/port -I../../src/include­ -I./src/include/por­t/win32 -DEXEC_BA
CKEND "-I../../src/includ­e/port/win32" -c -o path.o path.c
gcc -O2 -fno-strict-aliasin­g -Wall -Wmissing-prototype­s -Wmissing-declarati­o
ns -I../../src/port -I../../src/include­ -I./src/include/por­t/win32 -DEXEC_BA
CKEND "-I../../src/includ­e/port/win32" -c -o pipe.o pipe.c
pipe.c: In function `pgpipe':
pipe.c:32: warning: implicit declaration of function `ereport'
pipe.c:32: `LOG' undeclared (first use in this function)
pipe.c:32: (Each undeclared identifier is reported only once
pipe.c:32: for each function it appears in.)
pipe.c:32: warning: implicit declaration of function `errmsg_internal'
make[2]: *** [pipe.o] Error 1
make[2]: Leaving directory `/d/postgresql-snap­shot/src/port'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/d/postgresql-snap­shot/src'
make: *** [all] Error 2

Putting
#include "utils/elog.h"
in the beginning of the pipe.c solves the problem


However I did the build because I was trying to compile tsearch2, and it
fails too:

dict_ispell.o(.text­+0x31b):dict_ispell.­c: undefined reference to
`pg_strcasecmp'
dict_ispell.o(.text­+0x420):dict_ispell.­c: undefined reference to
`pg_strcasecmp'
dict_ispell.o(.text­+0x500):dict_ispell.­c: undefined reference to
`pg_strcasecmp'
wparser_def.o(.text­+0xc83):wparser_def.­c: undefined reference to
`pg_strcasecmp'
wparser_def.o(.text­+0xcd9):wparser_def.­c: undefined reference to
`pg_strcasecmp'
wparser_def.o(.text­+0xd02):wparser_def.­c: more undefined references to
`pg_strcasecmp' follow
ispell/SUBSYS.o(.te­xt+0xbd2):spell.c: undefined reference to
`pg_strncasecmp'
ispell/SUBSYS.o(.te­xt+0xbfc):spell.c: undefined reference to
`pg_strncasecmp'
ispell/SUBSYS.o(.te­xt+0xc15):spell.c: undefined reference to
`pg_strncasecmp'
ispell/SUBSYS.o(.te­xt+0xc2e):spell.c: undefined reference to
`pg_strncasecmp'
c:\mingw\bin\dllwra­p.exe: c:\mingw\bin\gcc exited with status 1
make: *** [libtsearch2.a] Error 1

Too late tonight to dig more...

Regards !




-------------------­--------(end of broadcast)---------­------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresq­l.org

comment 6 answers | Add comment
Monday, 24 September 2007
Problem with the use of Array and Loop Benjamin RICHARD 23:43:45
 Hi,
I would like to read each value of an array.
To do this i create the following function which return me a parse error
near '[' (in the Raise notice line)
What mistake did i do ?
And maybe there is a better way to do this in Postgre

CREATE FUNCTION array_int(_int4) RETURNS int4 AS 'DECLARE
start_char INTEGER DEFAULT 4;
len_char INTEGER;
array_count INTEGER;
val_tmp VARCHAR;
tmp INTEGER;
BEGIN
SELECT INTO val_tmp array_dims( $1 ) ; --get the length of the array =>
[x:y]
SELECT INTO len_char ( position('']'' in val_tmp) - start_char ) ; --get the
length of y
SELECT INTO array_count substring(val_tmp from start_char for len_char)
; --get the value of y


FOR tmp IN 1..(array_count) LOOP
RAISE NOTICE ''current value = %'' , $1[tmp] ;
END LOOP;

RETURN array_count ;

END;
-------------------­--------------------­--------------------­--------
Try :
select array_int('{5,3,6,9­,7,5,10,5,87,45,12,6­5,98,21,65,21}') ;


-------------------­--------(end of broadcast)---------­------------------
TIP 6: Have you searched our list archives?

http://archives.pos­tgresql.org

comment 2 answer | Add comment
Thursday, 23 August 2007
html forms Mattia Boccia 02:30:17
 I have installed a Postgres server and built up a test
database
now i would like to connect an HTML form with it to
insert data.

wich is the best way to do it?


i would like to use java for it but i need some usage
example.
does anyone now where i could find them?

regards

Matt

___________________­____________________­___________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yaho­o.com/

-------------------­--------(end of broadcast)---------­------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHer­e" to majordomo@postgresq­l.org)

comment 16 answers | Add comment
Monday, 18 June 2007
CachedRowSet insertion problem with serial PK Rcolmegna@Tiscali.It 12:16:32
 hi,

I'm tring postgresql-8.1-407.­jdbc3.jar (with PG 7.4.3 srv) and
CachedRowSet (Sun implementation).

I have a small test table: it has two fields:
1) id SERIAL NOT NULL PRIMARY KEY
2) info VARCHAR(100)


I try this java code:

CachedRowSet rs;
...
rs.setCommand("sele­ct id,info from a WHERE id<?");
rs.setInt(1, 10);
...
rs.moveToInsertRow(­);
rs.setString(2, "zzzz2");
rs.insertRow();

but I obtain this error:
"SQLException: Failed on insert row" (generated from the insertRow()
line).

I sniffed the network-connection betweend DB-srv and JDBC-client, and
I noted that
the INSERT instruction isn't fired against the DB. If I ask if
"isAutoIncrement(<i­d_idx>)"
I obtain a true reply.

Any idea?

TIA
Roberto Colmegna






La gara piГ№ entusiasmante dell'anno!

Gioca e corri alla velocitГ della luce sui 18 circuiti di Intel Speed Contest 2006!

I piГ№ bravi vincono Notebook Sony VAIO, iPod da 60 GB e altro ancora...

Sfida gli amici!

http://intelspeedco­ntest2006.tiscali.it­/


-------------------­--------(end of broadcast)---------­------------------
TIP 5: don't forget to increase your free space map settings

comment 2 answer | Add comment
Tuesday, 5 June 2007
Question Regarding Locks Terry Lee Tucker 18:49:53
 Greetings:

I am working on converting a transportation application from a Progress
database to PostgreSQL. This application will be hammered by about 75 users
at any given time. Also, depending on the operation, there are many record
updates that occur at the trigger level. I would like to be able to provide
feedback to the user when they select a row for update (using SELECT FOR
UPDATE). At present, if the row is being accessed (with SELECT FOR UPDATE) by
another user, the application just sits there waiting. I spent some time
looking at pg_locks hoping to be able to gain information from that table so
as to programically return something to the user. The stuff I read didn't
look promising. The only thing I've been able to come up with is having my
own "lock" table and inserting a row into it containing the table name, the
pid, the oid of the row, the user id, and a time stamp. Of course, I'm
searching lock table entries before selecting for update and reporting a lock
situation to the user if I find anything. I'm just wondering if I can use
some system table or combination of tables to provide the feed back I need.
Does anyone have any ideas about how to accomplish this? I searched the FAQ
and didn't find anything.

PostgreSQL 7.3.6-RH on i386-redhat-linux-g­nu, compiled by GCC
i386-redhat-linux-g­cc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-39)

Thanks...
--
Quote: 32
"The world we have created is a product of our thinking. It cannot be
changed without changing our thinking."

--Albert Einstein

Work: 1-336-372-6812
Cell: 1-336-363-4719
email: terry@esc1.com

-------------------­--------(end of broadcast)---------­------------------
TIP 4: Don't 'kill -9' the postmaster

comment 8 answers | Add comment
Wednesday, 2 May 2007
CSS file Nurlan Mukhanov 22:42:45
 Hello!

My name is Nurlan Mukhanov.

3 years ago I have made CSS file for PostgreSQL docs
reading. Can anybody include it in mainstream?

===================­===CUT START==============­=======
BODY { font-family : Tahoma; font-size : 8pt; color :
#000033; background: #FFFFFF; }
A:LINK { color : #333366; }
A:HOVER { color : #3333CC;text-decora­tion :
underline;}
A:VISITED {color : #3366CC;}
HR {size: 1;color: #3366CC;width: 90%;text-align :
center;}
TABLE {font-family: Tahoma;font-size: 8pt;}
h1 {font-family: Tahoma;color: #336600;font-size:
18pt;}
h3 {font-family: Tahoma;color: #339966;font-size:
14pt;border : thin none;}
h2 {font-family: Tahoma;color: #006666;font-size:
16pt;font-weight: bold;}
.ABBREV {color:#993399; font-weight: bold;}
.ABSTRACT {color: #666699; letter-spacing: 3;
margin-left: 18; font-family: Times New
Roman;font-size: 12pt; font-style : italic;}
.ACRONYM {color:#0066CC; font-weight: bold;}
.APPENDIX {}
.APPLICATION {color: #006666; font-family: Courier
New; font-weight: bold; font-size: 9pt}
.ATTRIBUTION {font-family: Arial; color: #003300;
font-size: 8pt; font-weight: bold;}
.AUTHOR {color: #336600; font-weight: bold;}
.BIBLIODIV {text-align: center;}
.BIBLIOENTRY {}
.BIBLIOENTRYBLOCK {}
.BIBLIOGRAPHY {}
.BLOCKQUOTE {}
.BOOK {}
h3.BRIDGEHEAD {color: #5757AC}
.CALLOUTLIST {}
table.CALSTABLE {font-family: Tahoma; font-size: 8pt;
color: #333333; border: #4A4A4A 1px; border-collapse:
collapse; border-style: solid; text-indent : 3px;}
table.CAUTION {background: #FFFFF; align: center;
font-family: Tahoma; font-size: 8pt; color: #FF0000;
border: #FF0000 1px solid; border-color: #FF0000 1px
solid; border-collapse: collapse; border-style: solid;
text-indent : 3px;}
.CHAPTER {}
.CITEREFENTRY {}
.CITETITLE {color: #7777DD; font-family: Times New
Roman;font-size: 12pt; font-style: italic;
font-weight: bold;}
.CLASSNAME {color: #6666FF; font-family: Courier;
font-size: 10pt; font-weight: bold;}
.COMMAND {color: #0033CC;}
.COMPUTEROUTPUT {font-family: Courier New;font-size:
8pt;color: #000066; font-weight: bold;}
.CONFDATES {color: #747474}
.CONFTITLE {color: #669966}
h1.COPYRIGHT {text-align: center;}
h3.CORPAUTHOR {text-align: center;}
.DATABASE {color: #003366; font-weight: bold;}
.EMAIL {color: #996699}
.EMPHASIS {font-weight: bold; font-family: Times New
Roman;font-size: 10pt; font-style: italic; color:
#336699}
.ENVAR {font-family: Arial;font-weight:
bold;font-size: 8pt;color:#990099;}­
.ERRORNAME {color:#CC3300;font­-weight: bold;}
.EXAMPLE {}
.FIGURE {}
.FILENAME {font-family: Courier;font-size:
10pt;color:#8C4600;­font-weight: bold;}
.FIRSTTERM {font-family: Times New Roman;font-size:
10pt; font-style: italic; color: #CC6600;}
.FOOTNOTES {color: #CC0000;}
.FOREIGNPHRASE {font-family: Times New
Roman;font-size: 10pt; font-style: italic; color:
#009148; font-weight: bold;}
.FORMALPARA {}
.FUNCTION {color: #CC3399;font-family­: Times New
Roman;font-size: 9pt; font-weight: bold;}
.GUIBUTTON {color: #666633; font-weight: bold;}
.GUILABEL {color: #5E5E00; font-weight: bold;}
.GUIMENU {color: #CC9900; font-weight: bold;}
.GUIMENUITEM {color: #00AA80; font-weight: bold;}
.IMPORTANT {background-color: #FFF2F2}
h2.INDEXDIV {color: #6600FF; font-family: Times New
Roman;font-size: 17pt; font-weight: bold; font-style:
italic;}
.INFORMALEXAMPLE {}
.INFORMALFIGURE {}
.INFORMALTABLE {}
.KEYCAP {color: #FF0066;}
.LEGALNOTICE {border-color: gray 2px solid;}
.LINEANNOTATION {color: #666666; font-family: Times
New Roman;font-size: 10pt; font-weight: bold;}
.LITERAL {font-family: Courier;font-size: 10pt;color:
#6600CC;}
.LITERALLAYOUT {color: #575739;}
.LOT {}
.MEDIAOBJECT {}
.MSG {}
.MSGENTRY {}
.MSGEXPLAN {color: #FF6666;}
.NAVFOOTER {}
.NAVHEADER {}
.NOTE {}
.OPTION {color: #0066FF; font-weight: bold;}
.OPTIONAL {font-family: Times New Roman;font-size:
9pt;font-style: italic; color: #0099CC;}
.PARA {}
.PARAMETER {color: #888844;}
.PART {text-align: left;}
.PARTINTRO {}
.PREFACE {}
.PROCEDURE {}
.PRODUCTNAME {font-weight: bold;}
.PROGRAMLISTING {font-family: Fixedsys; color:
#AF5F5F}
.PROMPT {color: #666699;font-family­: Courier
New;font-weight: bold;}
.QUOTE {color: #666699; font-weight: bold;}
.REFENTRY {}
.REFENTRYTITLE {font-weight: bold;}
.REFERENCE {}
.REFNAMEDIV {}
.REFSECT1 {}
.REFSECT2 {}
.REFSECT3 {}
.REFSYNOPSISDIV {}
.REPLACEABLE {font-family: Times New Roman;font-size:
12pt; color: #669999}
.RETURNVALUE {color: #006666;}
.SCREEN {font-family: Fixedsys;color: #000000;}
.SECT1 {}
.SECT2 {}
.SECT3 {}
.SECT4 {}
.SET {}
.SETINDEX {}
.SGMLTAG {color: #009933; Times New Roman;font-size:
10pt; font-weight: bold;}
.STRUCTFIELD {color: #CC0099; Times New
Roman;font-size: 9pt; font-style: italic;}
.STRUCTNAME {color: #0066FF; font-weight:
bold;font-size: 10pt;}
.SUBSTEPS {color: #669900;}
.SYMBOL {color: #339933; font-weight: bold; font-size:
10pt;}
.SYNOPSIS {font-family: Courier;font-size: 10pt;color:
#74744E;}
.SYSTEMITEM {font-weight: bold; color: #FF5959;}
.TABLE {}
.TIP {}
.TITLE {text-align: center;}
.TITLEPAGE {text-align: center;}
.TOC {text-align: left;}
.TOKEN {color: #FF9900; font-weight: bold;}
.TYPE {color: #009900;font-family­: Tahoma;font-size :
8pt;font-weight: bold;}
.USERINPUT {font-family: Courier New;font-size:
8pt;color: #666666;}
.VARIABLELIST {}
.VARNAME {color: #009900; font-weight:
bold;font-family: Tahoma;font-size : 8pt;}
===================­====CUT END================­======



___________________­_______________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.ya­hoo.com/mail_250

-------------------­--------(end of broadcast)---------­------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgres­ql.org/docs/faqs/FAQ­.html

comment 3 answer | Add comment
Tuesday, 10 April 2007
Performance issue Pascal Van Puymbroeck 17:05:57
 Hi folks,

I would like to solve a strange behaviour I encountered using Postgresql
8.0.1 on windows. Connecting to the database is OK, but when running a
query to the database, its terribly slow. The fact is that I need the
database to be running on the same machine, my application is. So I
connect to either localhost, 127.0.0.1 or 192.168.0.1. Strangly enough
I placed my application on my portable and connected from there to my pc
and now the queries are amazingly fast.
Is this something I can fix by some special setting or is it inevitably,
that connecting locally is punished by a performance slowdown ?

Thanks
Pascal Van Puymbroeck
ZENON productions bvba

-------------------­--------(end of broadcast)---------­------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

comment 43 answer | Add comment
Saturday, 24 March 2007
Syntax Error Marcel Boscher 03:28:33
 Hey there,

ERROR: function round(double precision, integer, integer) does not exist
Any suggestions

Purpose is to generate a 4 digit errorcode 1st letter alpha - rest numeric

my source code:

DECLARE
chars nchar(26);
charpos INTEGER;
character nchar(4);
nentries INTEGER;
key INTEGER;

BEGIN
chars := 'ABCDEFGHIJKLMNOPQR­STUVWXYZ';
charpos := Round((random() * (length(chars)-1)),­ 0, 0);
character := SubString(chars, charpos, 1) ;

nentries := 1;
WHILE (nentries > 0) LOOP
key := trunc(random() * 10000);

SELECT eCode = character + key

SELECT
INTO nentries
count(*)
FROM se_errorcode
WHERE se_errorcode.entry = eCode;
END LOOP;

INSERT
INTO se_errorcode (entry)
VALUES (eCode);

RETURN(eCode);
END;

Thx in advance
Marcel

-------------------­--------(end of broadcast)---------­------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHer­e" to majordomo@postgresq­l.org)

comment 18 answers | Add comment
Monday, 5 March 2007
Corrupted DB - Help Mark Liberman 10:13:26
 Running postgres 8.1.2 on gentoo linux 2.6.14

Server crashed (not sure if due to pg operation). Upon rebooting server and trying to start postgres, get the following log entries:

<4983:2006-07-27 18:04:24 PDT>LOG: database system was interrupted at 2006-07-27 17:58:51 PDT
<4983:2006-07-27 18:04:24 PDT>LOG: checkpoint record is at 2A4/2A23F328
<4983:2006-07-27 18:04:24 PDT>LOG: redo record is at 2A4/2A23F328; undo record is at 0/0; shutdown FALSE
<4983:2006-07-27 18:04:24 PDT>LOG: next transaction ID: 70649528; next OID: 345957
<4983:2006-07-27 18:04:24 PDT>LOG: next MultiXactId: 1742; next MultiXactOffset: 3498
<4983:2006-07-27 18:04:24 PDT>LOG: database system was not properly shut down; automatic recovery in progress
<4983:2006-07-27 18:04:24 PDT>LOG: redo starts at 2A4/2A23F36C
<4983:2006-07-27 18:04:24 PDT>WARNING: could not truncate relation 1663/128873/129263 to 398 blocks: Success
<4984:2006-07-27 18:04:24 PDT>LOG: connection received: host=[local]
<4984:2006-07-27 18:04:24 PDT>FATAL: the database system is starting up
<4981:2006-07-27 18:04:24 PDT>DEBUG: forked new backend, pid=4984 socket=7
<4981:2006-07-27 18:04:24 PDT>DEBUG: server process (PID 4984) exited with exit code 0
<4985:2006-07-27 18:04:25 PDT>LOG: connection received: host=[local]
<4985:2006-07-27 18:04:25 PDT>FATAL: the database system is starting up
<4981:2006-07-27 18:04:25 PDT>DEBUG: forked new backend, pid=4985 socket=7
<4981:2006-07-27 18:04:25 PDT>DEBUG: server process (PID 4985) exited with exit code 0
<4983:2006-07-27 18:04:26 PDT>PANIC: could not open relation 1663/128873/129201:­ No such file or directory
<4981:2006-07-27 18:04:26 PDT>LOG: startup process (PID 4983) was terminated by signal 6
<4981:2006-07-27 18:04:26 PDT>LOG: aborting startup due to startup process failure
<4982:2006-07-27 18:04:26 PDT>LOG: logger shutting down


The last commmand that I did right before the crash was a vacuum full on a very small table. After it completed, I exited psql, tried a non-pg command and it hung up. Here are the last log entries before the crash:

<1054:2006-07-27 18:00:18 PDT>LOG: statement: vacuum full verbose port_etr_state_offl­ine;
<1054:2006-07-27 18:00:18 PDT>INFO: vacuuming "public.port_etr_st­ate_offline"
<1054:2006-07-27 18:00:18 PDT>INFO: "port_etr_state_off­line": found 0 removable, 213 nonremovable row versions in 16 pages
<1054:2006-07-27 18:00:18 PDT>DETAIL: 0 dead row versions cannot be removed yet.
Nonremovable row versions range from 45 to 45 bytes long.
There were 2445 unused item pointers.
Total free space (including removable row versions) is 109896 bytes.
12 pages are or will become empty, including 0 at the end of the table.
16 pages containing 109896 free bytes are potential move destinations.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
<1054:2006-07-27 18:00:18 PDT>INFO: "port_etr_state_off­line": moved 213 row versions, truncated 16 to 2 pages
<1054:2006-07-27 18:00:18 PDT>DETAIL: CPU 0.00s/0.00u sec elapsed 0.00 sec.
<1054:2006-07-27 18:00:18 PDT>LOG: duration: 16.078 ms

Any way to salvage this db?

Thanks,

Mark
comment 2 answer | Add comment
Sunday, 28 January 2007
Change draft gmake control Bruce Momjian 00:38:30
 I had to change the draft flag for SGML from 'gmake draft html' to
'gmake DRAFT=Y html'. Internally the code used to recurse with DRAFT=Y,
but I found there is no way to exit the makefile after the recursion
returned, so I had to use this new syntax. Though more cumbersome, it
is more logical because DRAFT is really a modifier, not a rule itself.
For example, 'gmake html draft' would never have worked. Patch attached
and applied.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterpri­sedb.com

+ If your life is a hard drive, Christ can be your backup. +



-------------------­--------(end of broadcast)---------­------------------
TIP 4: Have you searched our list archives?

http://archives.pos­tgresql.org
comment 8 answers | Add comment
DROP FUNCTION failure: cache lookup failed for relation X Michael Fuhr 00:38:30
 I've found a situation that causes DROP FUNCTION to fail (tested
in 8.1.6, 8.2.1, and 8.3devel):

CREATE TABLE foo (id integer);

CREATE FUNCTION foofunc() RETURNS trigger AS $$
BEGIN
RETURN NEW;
END;
$$ LANGUAGE plpgsql;

Then in concurrent sessions:

A: BEGIN;

A: CREATE TRIGGER footrig BEFORE INSERT ON foo
FOR EACH ROW EXECUTE PROCEDURE foofunc();

B: DROP TABLE foo; -- blocks pending A's commit

A: COMMIT; -- B's DROP TABLE completes

A: SELECT tgrelid FROM pg_trigger WHERE tgname = 'footrig';
tgrelid
---------
66153
(1 row)

A: DROP FUNCTION foofunc();
ERROR: cache lookup failed for relation 66153

Apparently the row in pg_trigger that A committed wasn't deleted
by B's DROP TABLE, presumably because B didn't have visibility to
to the trigger when its DROP TABLE statement began. This case is
admittedly contrived but I did stumble across it in a test environment.

--
Michael Fuhr

-------------------­--------(end of broadcast)---------­------------------
TIP 4: Have you searched our list archives?

http://archives.pos­tgresql.org

comment 2 answer | Add comment
initdb failure John Wilcher 00:38:30
 Hi!

I received the following error after attempting to initialize the database
within Cygwin.

selecting default shared_buffers... Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
Signal 12
50
creating configuration files... ok
creating template1 database in /user/local/pgsql/d­ata/ba

initdb: failed
initdb: removing data directory "/user/local/pgsql/­data"

Any help is appreciated. Here is my configuration dump:

$ cygcheck -s

Cygwin Configuration Diagnostics
Current System Time: Fri Aug 06 10:48:18 2004

Windows XP Home Edition Ver 5.1 Build 2600

Path: C:\cygwin\usr\local­\bin
C:\cygwin\bin
C:\cygwin\bin
C:\cygwin\usr\X11R6­\bin
c:\WINDOWS\system32­
c:\WINDOWS
c:\WINDOWS\System32­\Wbem
c:\Program Files\PuTTY
c:\java\apache-ant-­1.6.1\bin
c:\java\j2sdk1.4.2_­04
.\

Output from C:\cygwin\bin\id.ex­e (nontsec)
UID: 1006(John) GID: 513(None)
513(None)

Output from C:\cygwin\bin\id.ex­e (ntsec)
UID: 1006(John) GID: 513(None)
0(root) 513(None)
544(Administrators)­ 545(Users)

SysDir: C:\WINDOWS\System32­
WinDir: C:\WINDOWS

HOME = `C:\cygwin\home\Joh­n'
MAKE_MODE = `unix'
PWD = `/home/John'
USER = `John'

Use `-r' to scan registry

c: hd NTFS 28576Mb 28% CP CS UN PA FC
d: hd FAT 62Mb 67% CP UN FLASH DISK
e: cd N/A N/A

C:\cygwin / system binmode
C:\cygwin/bin /usr/bin system binmode
C:\cygwin/lib /usr/lib system binmode
. /cygdrive system binmode,cygdrive

Found: C:\cygwin\bin\awk.e­xe
Found: C:\cygwin\bin\bash.­exe
Found: C:\cygwin\bin\cat.e­xe
Found: C:\cygwin\bin\cp.ex­e
Not Found: cpp (good!)
Found: C:\cygwin\bin\find.­exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin\bin\grep.­exe
Not Found: ld
Found: C:\cygwin\bin\ls.ex­e
Not Found: make
Found: C:\cygwin\bin\mv.ex­e
Found: C:\cygwin\bin\rm.ex­e
Found: C:\cygwin\bin\sed.e­xe
Found: C:\cygwin\bin\sh.ex­e
Found: C:\cygwin\bin\tar.e­xe

61k 2003/08/09 C:\cygwin\bin\cygbz­2-1.dll
7k 2003/10/19 C:\cygwin\bin\cygcr­ypt-0.dll
841k 2004/03/17 C:\cygwin\bin\cygcr­ypto-0.9.7.dll
45k 2001/04/25 C:\cygwin\bin\cygfo­rm5.dll
35k 2002/01/09 C:\cygwin\bin\cygfo­rm6.dll
48k 2003/08/09 C:\cygwin\bin\cygfo­rm7.dll
28k 2003/07/20 C:\cygwin\bin\cyggd­bm-3.dll
30k 2003/08/11 C:\cygwin\bin\cyggd­bm-4.dll
19k 2003/03/22 C:\cygwin\bin\cyggd­bm.dll
15k 2003/07/20 C:\cygwin\bin\cyggd­bm_compat-3.dll
15k 2003/08/11 C:\cygwin\bin\cyggd­bm_compat-4.dll
107k 2004/07/06 C:\cygwin\bin\cygge­ttextlib-0-14-1.dll
17k 2004/07/06 C:\cygwin\bin\cygge­ttextpo-0.dll
190k 2004/07/06 C:\cygwin\bin\cygge­ttextsrc-0-14-1.dll
17k 2001/06/28 C:\cygwin\bin\cyghi­story4.dll
29k 2003/08/10 C:\cygwin\bin\cyghi­story5.dll
991k 2004/07/06 C:\cygwin\bin\cygic­onv-2.dll
22k 2001/12/13 C:\cygwin\bin\cygin­tl-1.dll
37k 2003/08/10 C:\cygwin\bin\cygin­tl-2.dll
54k 2004/07/06 C:\cygwin\bin\cygin­tl-3.dll
26k 2001/04/25 C:\cygwin\bin\cygme­nu5.dll
20k 2002/01/09 C:\cygwin\bin\cygme­nu6.dll
29k 2003/08/09 C:\cygwin\bin\cygme­nu7.dll
156k 2001/04/25 C:\cygwin\bin\cygnc­urses++5.dll
175k 2002/01/09 C:\cygwin\bin\cygnc­urses++6.dll
226k 2001/04/25 C:\cygwin\bin\cygnc­urses5.dll
202k 2002/01/09 C:\cygwin\bin\cygnc­urses6.dll
224k 2003/08/09 C:\cygwin\bin\cygnc­urses7.dll
15k 2001/04/25 C:\cygwin\bin\cygpa­nel5.dll
12k 2002/01/09 C:\cygwin\bin\cygpa­nel6.dll
19k 2003/08/09 C:\cygwin\bin\cygpa­nel7.dll
62k 2003/12/11 C:\cygwin\bin\cygpc­re-0.dll
63k 2003/04/11 C:\cygwin\bin\cygpc­re.dll
9k 2003/12/11 C:\cygwin\bin\cygpc­reposix-0.dll
61k 2003/04/11 C:\cygwin\bin\cygpc­reposix.dll
108k 2001/06/28 C:\cygwin\bin\cygre­adline4.dll
148k 2003/08/10 C:\cygwin\bin\cygre­adline5.dll
171k 2004/03/17 C:\cygwin\bin\cygss­l-0.9.7.dll
61k 2003/12/04 C:\cygwin\bin\cygz.­dll
1126k 2004/05/26 C:\cygwin\bin\cygwi­n1.dll
Cygwin DLL version info:
DLL version: 1.5.10
DLL epoch: 19
DLL bad signal mask: 19005
DLL old termios: 5
DLL malloc env: 28
API major: 0
API minor: 116
Shared data: 4
DLL identifier: cygwin1
Mount registry: 2
Cygnus registry name: Cygnus Solutions
Cygwin registry name: Cygwin
Program options name: Program Options
Cygwin mount registry name: mounts v2
Cygdrive flags: cygdrive flags
Cygdrive prefix: cygdrive prefix
Cygdrive default prefix:
Build date: Tue May 25 22:07:00 EDT 2004
CVS tag: cr-0x5e6
Shared id: cygwin1S4


Cygwin Package Information
Package Version
_update-info-dir 00227-1
ash 20040127-1
base-files 2.6-1
base-passwd 1.1-1
bash 2.05b-16
bzip2 1.0.2-5
crypt 1.1-1
cygrunsrv 1.0-1
cygwin 1.5.10-3
diffutils 2.8.7-1
editrights 1.01-1
fileutils 4.1-2
findutils 4.1.7-4
gawk 3.1.4-3
gdbm 1.8.3-7
grep 2.5-1
groff 1.18.1-2
gzip 1.3.5-1
less 381-1
libbz2_1 1.0.2-5
libgdbm 1.8.0-5
libgdbm-devel 1.8.3-7
libgdbm3 1.8.3-3
libgdbm4 1.8.3-7
libgettextpo0 0.14.1-1
libiconv2 1.9.2-1
libintl1 0.10.40-1
libintl2 0.12.1-3
libintl3 0.14.1-1
libncurses5 5.2-1
libncurses6 5.2-8
libncurses7 5.3-4
libpcre 4.1-1
libpcre0 4.5-1
libreadline4 4.1-2
libreadline5 4.3-5
login 1.9-7
man 1.5k-3
mktemp 1.5-3
ncurses 5.3-4
openssl 0.9.7d-1
postgresql 7.4.3-1
readline 4.3-5
sed 4.0.9-2
sh-utils 2.0.15-4
tar 1.13.25-5
termcap 20021106-2
terminfo 5.3_20030726-1
texinfo 4.2-4
textutils 2.0.21-1
which 1.5-2
zlib 1.2.1-1
Use -h to see help about each section

Thanks!

John Wilcher



-------------------­--------(end of broadcast)---------­------------------
TIP 7: don't forget to increase your free space map settings

comment 5 answers | Add comment
[pgsql-patches] Ctid chain following enhancement Pavan Deolasee 00:17:11
 
-------------------­--------(end of broadcast)---------­------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgres­ql.org/docs/faq
comment 3 answer | Add comment
[pgsql-patches] minor regression test refactor Neil Conway 00:10:18
 I noticed that the "bigcheck" and "bigtest" targets of
src/test/regress/GN­UMakefile don't have the right dependencies:

$ make -C src/test/regress clean bigcheck
[...]
make: ./pg_regress: Command not found
make: *** [bigcheck] Error 127

Attached is a patch that fixes this, by making "bigcheck" and "bigtest"
depend on the "all" target. Along the way, I removed some old Makefile
targets that were just aliases for existing targets, and refactored the
code for setting up the tablespace directory to avoid repeating it five
times.

Barring any objections, I'll apply this tomorrow.

-Neil




-------------------­--------(end of broadcast)---------­------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgres­ql.org/docs/faq
comment 1 answer | Add comment

Add new topic:

How:  Register )
 
Login:   Password:   
Comments by: Premoderation:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > PostgreSQL database developmentGo to page: « previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | next »

see also:
relationship 1->1…
Problem with 1-->Many bidirectional…
XDoclet and EJB with CMR -- Newbie
pass tests:
..
see also:

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .