473,799 Members | 3,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

basic debugging question


I'm attempting to debug a script that should perform a simple INSERT of
values,
but for some reason doesn't. The insert appears to occur without
error, printing
"INSERT 18015 1 upon completion." Nonetheless, no data values appear
to be
added to the table when queried in psql.

Questions:

- What does the status msg, "INSERT 18015 1," refer to?

- What is this output called? (So I can search the documentation for
it.)

- Is there something clever I can access -- besides this list ;) -- so
I can
peek inside INSERT 18015 1 to see what pgres is thinking about?

Note that when I perform the INSERT by hand in psql, the row of data is
entered
without incident.

Thanks in advance!
Scott

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #1
4 1968
Am Di, den 26.10.2004 schrieb Scott Frankel um 21:39:
I'm attempting to debug a script that should perform a simple INSERT of
values,
but for some reason doesn't. The insert appears to occur without
error, printing
"INSERT 18015 1 upon completion." Nonetheless, no data values appear
to be
added to the table when queried in psql.

Questions:

- What does the status msg, "INSERT 18015 1," refer to?

- What is this output called? (So I can search the documentation for
it.)

- Is there something clever I can access -- besides this list ;) -- so
I can
peek inside INSERT 18015 1 to see what pgres is thinking about?

Note that when I perform the INSERT by hand in psql, the row of data is
entered
without incident.


Ok, the script inserts, no error but the values dont appear.
You use the same SQL in psql to insert, you get the status
msg and the data appears?

Either your script ignores fail messages at all or
it is successfull with the insert but fails somehow
afterwards or just forget to commit() the transaction.
Closing the database connection or errors in subsequent
statements in the same transaction cause a rollback -
efectively whiping out all changes.

If the latter there would be no point in reading the
notices since you would get the very same message
but end up with no tuples in the table.

See for example in psql:

BEGIN work;
INSERT INTO ... (your insert you try);
-> you see the message INSERT 232354 1 upon completion
ROLLBACK;
look at your table - the inserted data isnt there anymore.

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

Nov 23 '05 #2
On Tue, 2004-10-26 at 12:39 -0700, Scott Frankel wrote:
I'm attempting to debug a script that should perform a simple INSERT of
values,
but for some reason doesn't. The insert appears to occur without
error, printing
"INSERT 18015 1 upon completion." Nonetheless, no data values appear
to be
added to the table when queried in psql.

Questions:

- What does the status msg, "INSERT 18015 1," refer to?
It means one row was added to some table and the row's oid is 18015.

.... - Is there something clever I can access -- besides this list ;) -- so
I can
peek inside INSERT 18015 1 to see what pgres is thinking about?


Try

SELECT * FROM <tablename> WHERE oid = 18015;

If that returns nothing, the row must have been added to some other
table, which would imply the existence of another table with a
compatible structure.

--
Oliver Elphick ol**@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
=============== =============== ==========
"Whosoever therefore shall be ashamed of me and of my
words in this adulterous and sinful generation; of him
also shall the Son of man be ashamed, when he cometh
in the glory of his Father with the holy angels."
Mark 8:38
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #3
On Tue, Oct 26, 2004 at 12:39:46PM -0700, Scott Frankel wrote:

I'm attempting to debug a script that should perform a simple INSERT of
values,
but for some reason doesn't. The insert appears to occur without
error, printing
"INSERT 18015 1 upon completion." Nonetheless, no data values appear
to be
added to the table when queried in psql.
Wild stab: did you do it within a transaction and not commit. Note that
some database interfaces automatically start a transaction. Look for
"autocommit " or "commit".
Questions:

- What does the status msg, "INSERT 18015 1," refer to?
The first is the OID of the row, the second is the number of rows
inserted.
- What is this output called? (So I can search the documentation for
it.)
No idea, it's generated by psql. In a database interface you can get
the values directly.

Hope this helps,
--
Martijn van Oosterhout <kl*****@svana. org> http://svana.org/kleptog/ Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
tool for doing 5% of the work and then sitting around waiting for someone
else to do the other 95% so you can sue them.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFBfrGpY5T wig3Ge+YRAmxeAJ 9TD50Rv3/7biuwY5hgfRjzZn 4FFgCfdjhL
8AYR1QaqlpxN5Je z2SJUrLo=
=Rf6G
-----END PGP SIGNATURE-----

Nov 23 '05 #4

I should have *myself* committed.

Thanks for the suggestions (and OID tip)! It turned out that my script
was
not committing the transaction, so the insert was getting rolled-back.

Thanks
Scott

On Oct 26, 2004, at 12:39 PM, Scott Frankel wrote:

I'm attempting to debug a script that should perform a simple INSERT
of values,
but for some reason doesn't. The insert appears to occur without
error, printing
"INSERT 18015 1 upon completion." Nonetheless, no data values appear
to be
added to the table when queried in psql.

Questions:

- What does the status msg, "INSERT 18015 1," refer to?

- What is this output called? (So I can search the documentation for
it.)

- Is there something clever I can access -- besides this list ;) -- so
I can
peek inside INSERT 18015 1 to see what pgres is thinking about?

Note that when I perform the INSERT by hand in psql, the row of data
is entered
without incident.

Thanks in advance!
Scott

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

---------------------------(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

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1597
by: Troy Erickson | last post by:
I am very new to web developing. What is the best way to create a web project. I will be using asp with vs.net. What do most people do for computers more specifically. Do I remote debug to a server. Setup a computer that is a server and do my developing on the same machine? Have two servers and when the project is done transfer it to the production server?
3
369
by: Nosnets | last post by:
I am learning from a text book. Debugging breakpoints does not work. The Breakpoint properties dialogue contains the following comment "The breakpoint will not currently be hit. No symbols have been loaded for this document." After some research with the help system I typed the following path into Debug Symbol Files, a property of the Solution "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\symsvr.dll" The server is...
0
3232
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
7
3165
by: Frank | last post by:
I'm running a mixed ASP / ASP.NET environment. I can use the debugger in for the ASP.NET code, no problems. But when I turn on ASP Debugging for the project, I get the error message: "Error while trying to run project. Unable to start debugging. ASP debugging is disabled because the ASP process is running as a user that does not have debug permissions. Click Help for more information." This is Windows 2003 Server, logged in as...
2
3277
by: Alex Clark | last post by:
Hi All, My system: WinXP Pro, VS.NET 2003, SQL Server Personal Edition. I'm having problems with my old favourite demon, SQL Debugging from within VS.NET. I have to say I've found this particular feature to be one of the most useful and (sadly) unreliable/fragile features in VS.NET, it seems the slightest thing will break it.
1
1130
by: sher | last post by:
I just reinstalled Visual Basic.NET because I was receiving the following error: "Error while trying to run project. Unable to start debugging. No such interface supported." BUT, I am still receiving the same error when I run the project. Any suggestions. TIA.
2
928
by: Bob | last post by:
In code when I'm handling an exception, I'd like to be able to tell the debugger, if it's attached, to break and then navigate to where the exception was thrown, which won't be where I break. Is that possible? Bob
0
1451
by: JT | last post by:
Hi, I've just realized that I'm not as smart as I thought I was. I have no problem creating Windows apps, class libraries, using windows references, etc. But, I absolutely cannot create and use a web service and Windows application pair in VS 2005, even following the walkthrough in Help. There are differences in some of the steps they outline that I assume are due to an old example and I am using VS 2005. On my latest attempt I...
8
2217
by: razael1 | last post by:
I am putting debugging messages into my program by putting blocks that look like this: #ifdef DEBUG errlog << "Here is some information"; #endif All these #ifdef blocks make the code bulky and harder to read, so I'd like to do something where I put: errMsg("Here is some information");
25
2481
by: Marco | last post by:
Hi everyone. I've been trying to move some small applications written in vb.net 2003 to vb.net 2005 express just for testing purposes. I have noticed so far that the applications seem to run much slower in the 2005 version. Especially when it comes to nested loops. I haven't done much testing so it might just be this one computer but I was curious to know if anyone else has experienced these kind of problems when moving to the 2005...
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10485
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10252
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10231
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.