Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-14 Thread MOLINA BRAVO FELIPE DE JESUS
perl DBI vs psql problem No, I don't have 2 instances running. I default the port on the psql command line, and the perl program is using 5432, as normal. Now, I'm discovering that syslog is no longer logging anything. I bounced it, but to no avail. Susan Check the log from webserve

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
The only one that comes out different is inet_server_addr, via the program, it comes out: ::1 whereas via psql it comes out empty. Yes, I am 100% sure I am using the same schema (which I never specify, so I am using 'public') and the same user and database. Susan On Thu, Mar 13, 2014 at 1:53

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
I finally figured it out, after changing my code to output the lines per the number of rows of output, instead of until data[0] was blank. It turned out that data[0] was sometimes blank, and I forgot about that, and was stopping the output after I got back an empty record (or so I thought). So, a

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Rob Sargent
On 03/13/2014 03:23 PM, Susan Cassidy wrote: The only one that comes out different is inet_server_addr, via the program, it comes out: ::1 whereas via psql it comes out empty. Yes, I am 100% sure I am using the same schema (which I never specify, so I am using 'public') and the same user and

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
You asked for it (by the way, just p is asking for a lot of output): root23 0.0 0.0 0 0 ?SFeb20 0:00 [cgroup] root24 0.0 0.0 0 0 ?SFeb20 0:00 [khelper] root27 0.0 0.0 0 0 ?SFeb20 0:00 [pm] root

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Rob Sargent
On 03/13/2014 02:44 PM, Susan Cassidy wrote: No, I don't have 2 instances running. I default the port on the psql command line, and the perl program is using 5432, as normal. Now, I'm discovering that syslog is no longer logging anything. I bounced it, but to no avail. Susan On Thu, Mar

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Rodrigo Gonzalez
On Thu, 13 Mar 2014 13:44:48 -0700 Susan Cassidy wrote: > No, I don't have 2 instances running. I default the port on the psql > command line, and the perl program is using 5432, as normal. > > Now, I'm discovering that syslog is no longer logging anything. I > bounced it, but to no avail. Th

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Dennis Jenkins
1) Run both "psql" and "perl" under "strace" and search the output for which sockets it connects to. eg, strace -o /tmp/psql.log psql -Upgsql -dmydatabase -c"select version();" 2) Add a query into your perl script to perform the following SQL and print the results: select current_database();

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
No, I don't have 2 instances running. I default the port on the psql command line, and the perl program is using 5432, as normal. Now, I'm discovering that syslog is no longer logging anything. I bounced it, but to no avail. Susan On Thu, Mar 13, 2014 at 1:34 PM, Rodrigo Gonzalez wrote: > O

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Rodrigo Gonzalez
On Thu, 13 Mar 2014 13:28:38 -0700 Susan Cassidy wrote: > No, it is connecting to localhost, which is the same system I am > running psql on. > > Susan > Well, if one query is logged and the other one is not it means that it is running against different servers (as far as I understand logging).

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
No, it is connecting to localhost, which is the same system I am running psql on. Susan On Thu, Mar 13, 2014 at 1:26 PM, Rodrigo Gonzalez wrote: > On Thu, 13 Mar 2014 13:20:53 -0700 > Susan Cassidy wrote: > > > Another odd thing is that it is apparently not logging statements from > > Perl, o

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Rodrigo Gonzalez
On Thu, 13 Mar 2014 13:20:53 -0700 Susan Cassidy wrote: > Another odd thing is that it is apparently not logging statements from > Perl, only from psql. I don't know why. I thought I had it set up > right to log to syslog. I've had good luck before with that on other > installations. > I can

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Steve Atkins
On Mar 13, 2014, at 1:20 PM, Susan Cassidy wrote: > Yes, I am running with use strict. The statement I pasted in is after perl > quoting, being written out by the same perl program. I just take that > statement and paste it into the psql window. > > DBI->trace showed nothing out of the ord

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
No, I am connecting to the right database, as my log info shows. No duplicate table names, except in different databases. Those tables show all the data I expect, oddly enough, if I connect the perl program to that database. It is only this database that is giving me trouble. Which is another o

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
Yes, I am running with use strict. The statement I pasted in is after perl quoting, being written out by the same perl program. I just take that statement and paste it into the psql window. DBI->trace showed nothing out of the ordinary. It just shows the lines being fetched that I am seeing in

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Steve Atkins
On Mar 13, 2014, at 12:18 PM, Susan Cassidy wrote: > I have a weird issue that I can't figure out. > > If I run the exact same query through psql as through perl DBI, I get > different results. I get far fewer results with DBI than through the psql > command line. > > Any ideas why that wo

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread john gale
On Mar 13, 2014, at 12:18 PM, Susan Cassidy wrote: > I copied and pasted the query from the program's log file, so I know I'm > doing the exact same query. If it matters, I'm only seeing the rows with > 'root' in them via DBI, which the CASE statement refers to. Try enabling full query l

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Tom Lane
Susan Cassidy writes: > I have a weird issue that I can't figure out. > If I run the exact same query through psql as through perl DBI, I get > different results. I get far fewer results with DBI than through the psql > command line. Any possibility that the perl program is connecting to a diffe

[GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Susan Cassidy
I have a weird issue that I can't figure out. If I run the exact same query through psql as through perl DBI, I get different results. I get far fewer results with DBI than through the psql command line. Any ideas why that would be? The query is: SELECT st.description, st.scene_thing_instan