Skip to main content

Questions tagged [perl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Table Query From MySql 8.4 Command Line Client Returns "Empty Set" While Perl script query returns the called item

Using Mysql 8.4 mysql> SELECT * FROM jobs; Empty set (0.00 Sec) After connecting to the database this Perl script returns a file "supposedly posted to the table 'jobs' in jobs_db $sth = $dbh-&...
user3135388's user avatar
0 votes
3 answers
2k views

Installing DBD:Oracle on RedHat 8.8

I am trying to install DBD:Oracle. I'm in the following environment: Red Hat Enterprise Linux release 8.8 (Ootpa) Perl v5.26.3 Our DBA installed the Oracle 19 client in this location: /u01/app/oracle/...
Stev's user avatar
  • 1
0 votes
0 answers
61 views

PGSQL pgcompacttable on windows

I have a big PGSQL database and need to reclaim some disk space.PGSQL is version 13.2, running on Windows. I have found several posts which state you can use pgcompacttable on a windows PGSQL and i ...
Morph's user avatar
  • 11
4 votes
1 answer
2k views

Where temp table data goes after creation?

As far as I can understand temp_buffers setting serve for storing temp tables data. But as I have created a temp table immediately files gets created for it inside PGDATA along with the main database. ...
George K's user avatar
  • 2,296
1 vote
1 answer
370 views

Error during plperl compilation: quoted execution trapped by operation mask

When I try to create a perl function, I get an error. CREATE OR REPLACE FUNCTION foo() RETURNS text AS $BODY$ use v5.28; use warnings; my $output = `/data/myapp`; # or qx('/data/myapp') return ...
Tweety's user avatar
  • 11
0 votes
1 answer
774 views

Oracle: Connects with sqlplus but not from perl

I need to connect to an Oracle database from a perl script, it works in my tests and when using sqlplus, but not in production. This is a summary of the situation: Oracle 11g XE (11.2.0.2.0) : (Test ...
lepe's user avatar
  • 103
1 vote
2 answers
205 views

Reading data from oracle 8 in 2019

I'm an intern stuck dealing with a database system that is as old as I am. The Issue: I have a perl script pulling data from a server running Oracle 8 (8.1.7) and placing the data into a .csv. The ...
Nicolasome's user avatar
3 votes
2 answers
1k views

Convert Ruby regex to Postgres regex, for selecting invalid email addresses

I've done some internet trawling, and some reading of the Postgres regex docs, but I'm at the stage where I think asking a question here is the best thing to do. I have the following Ruby regex: /\A[...
samjewell's user avatar
  • 131
0 votes
1 answer
2k views

Msg 102, Level 15, State 1, Server DESKTOP-U368A1B, Line 1 Incorrect syntax near '1'

I get the above error message when i run the following perl script from the cmd, that is supposed to do some transaction in my database. #!/usr/bin/perl. use warnings; use strict; my ( $pid1, $...
user avatar
5 votes
2 answers
714 views

Kill infinite loop plperl

How can I kill session with infinite looped plperl function? Both pg_terminate_backend and pg_cancel_backend had no effect. kill -1 pid did nothing as well and kill -9 pid crashed server.
Łukasz Kamiński's user avatar
-2 votes
2 answers
104 views

Plperlu func with column as param [closed]

I have postgres 9.5, and want to use plperlu as lang to get result from curl put My func is: create or replace function langDetect(str text) returns text as $$ use warnings; use strict; my $str = $_[...
Ivan Alex's user avatar
0 votes
0 answers
271 views

How to install pgperl for postgresql 9.6 windows [duplicate]

Trying various versions of ActiveState and Strawberry Perl, I'm still not having any luck overcoming: pg96/lib/postgresql/plperl.dll: The specified module could not be found Suggestions that may ...
Reinsbrain's user avatar
5 votes
1 answer
9k views

How to create an alphanumeric sequence like AAAA0000 and so on

I want to create an alphanumeric sequence like this: AAAA0000 AAAA0001 AAAA0002 AAAA0003 . . . AAAA9999 AAAB0000 AAAB0001 . . . ZZZZ9999 I have created this store procedure to do that but its too ...
juanpscotto's user avatar
3 votes
2 answers
3k views

Installing a language with Amazon RDS?

I am using an instance of Postgres on RDS and I am trying to run: => create language plperlu; but I get: ERROR: must be superuser to create procedural language "plperlu" If I run: => grant ...
Randomize's user avatar
  • 1,203
1 vote
1 answer
104 views

Why would Mysql's Round(N.DD,1) sometimes show no digits after the decimal place when using the Perl DBI?

We have a set of calculations that do something like SELECT ROUND(SUM(ROUND(3*IP))/3,1) as IP_sum from .... Say for example that IP_sum is exactly 180. When we call from the mysql client we get 180....
Sean's user avatar
  • 113
2 votes
1 answer
6k views

Character Encoding in Postgres

I have UTF8 data stored in Postgres. I can query it with a Perl script and display it properly. When I use the Postgres client, it displays like the encoding is off. I'll see characters displayed ...
thatguy's user avatar
  • 21
-1 votes
1 answer
1k views

Import Oracle dump from Amazon RDS

I have successfully transferred my dump files to my RDS database instance based on http://d0.awsstatic.com/whitepapers/strategies-for-migrating-oracle-database-to-aws.pdf Now, I want to reverse ...
user avatar
1 vote
1 answer
146 views

Postgresql perl : "NOTICE: elseif should be elsif at line ..."

It's not the first time I get this strange NOTICE when adding perl functions in Postgresql : NOTICE: elseif should be elsif at line 11. This happens at CREATE FUNCTION as well as when using the ...
Denis BUCHER's user avatar
1 vote
2 answers
2k views

Storing blobs outside the database

I had a PostgreSQL database with loads of scanned documents, as a document bytea column in the table scans, with hundreds of thousands of documents that was large and inconvenient to backup. Also, ...
Ezequiel Tolnay's user avatar
2 votes
1 answer
303 views

pt-table-sync fails "Turning off AutoCommit"

While trying to use pt-table-sync with the following options for a list of slaves: pt-table-sync --print --replicate schema.checksum_table --sync-to-master slave-001 I receive the following error ...
Ana C.'s user avatar
  • 83
-1 votes
1 answer
148 views

How we can make database resumable in perl script

I have a Perl code which connects with database and scan data from different different table. I face a problem if I lose my connection: it roll back all the transaction. How could I make the Perl ...
user46732's user avatar
2 votes
1 answer
2k views

DBD::mysql complains "Character set 'latin1' is not a compiled character set"

I think this boils down to "Am I doomed to upgrading mysql hoping the problem goes away?". I've seen a few of the same issues around the internet but with no guidance on a fix other than "Did you turn ...
brian d foy's user avatar
1 vote
2 answers
2k views

Perl - MySQL/MariaDB - slow with no identifiable bottleneck

I am running a Perl script (using DBI) which reads from raw files from a hard disk, and updates MySQL database (which is on a separate SSD). My performance is rather slow (1000 files processed in 30-...
Shalabajzer's user avatar
3 votes
2 answers
936 views

How can I load 'utf8' into plperl by default?

I am attempting to solve a problem explained in another question here. On Debian 7.4 with Postgres 9.1.12, I am able to use the Perl qr operator just fine. On Solaris 5.11 with Postgres 9.2.4, ...
Flimzy's user avatar
  • 599
1 vote
1 answer
2k views

How to generate current Oracle timestamp in perl?

I use DBI. And I want to make some like INSERT INTO ... VALUES (the_generated_timestamp, ...); What is the command? How could it be created, the perl ocaltime scalar value has a very complex, for ...
peterh's user avatar
  • 2,109
3 votes
2 answers
2k views

Perl DBI takes 60 seconds to connect to an Oracle database, every single time

I feel like I must be doing something wrong with my SQL connections. I've generally ignored it, but I'm finally going to try and get to the bottom of this. my $dsn = "DBI:Oracle:host=$host;sid=$sid";...
ND Geek's user avatar
  • 201
1 vote
1 answer
10k views

Create Language plperl - Error: could not load library plperl.dll

When I create language plperl , I get error: ERROR: could not load library "C:/Program Files/PostgreSQL/9.1/lib/plperl.dll": The specified module could not be found. But in my computer, "plperl.dll"...
Luan Huynh's user avatar
  • 1,982
0 votes
1 answer
1k views

Cannot create perlplu function

Running PostgreSQL 9.1.8 on Xubuntu 12.04, installed from the repos. From the shell, I have executed: createlang plperl db_name; createlang plperlu db_name; As the superuser running psql, I have ...
Dave Jarvis's user avatar
0 votes
3 answers
6k views

How to avoid deadlock while updating 2 rows in MySQL

This is a interview problem: There is a perl program that updates the database, and it could run in different processes. One process may execute a transaction like: update row A -> update row B -&...
Terry's user avatar
  • 1
1 vote
1 answer
1k views

Sybase Database Migration from 11.5 to 15

I have to migrate the Sybase Database from 11.5 version to 15. I would like to know few things mentioned below - i) What are the neccessary steps I need to follow in this migration. ii) What are the ...
user avatar
1 vote
4 answers
1k views

Backup and restore of RDBMS(Oracle, DB2, SQL Server) from Perl

What could be the best approach ? Till now could figure out the following (Oracle) Calling exp.exe and imp.exe utilities in Oracle client using Java and inturn call it from Perl. Calling exp.exe and ...
user762421's user avatar
2 votes
2 answers
9k views

Limit WHERE to MAX() & COUNT()

This is my current mySQL query: SELECT e.*, MAX(m.datetime) AS unread_last, COUNT(m.id) AS unread FROM TAB_EVENT e LEFT JOIN TAB_MESSAGE m ON e.id=m.event_id WHERE ( m.`read` IS NULL OR m.`read`...
Sebastian's user avatar
  • 217
1 vote
1 answer
200 views

Sybase internal tables for ORM generation

I am working on a Perl application that uses DBIx::Class::Schema::Loader in order to generate the ORM layer of the application, against a Sybase ASE 15.5 database. We recently migrated from Sybase 12....
angelixd's user avatar
5 votes
1 answer
1k views

PostgreSQL pl/perl trigger, differentiate null vs empty

I've been trying to speed up a generic auditing trigger that I had written in pl/pgsql some time back. On update, it generates a list of columns in the table being updated and inserts rows in the ...
Jafoy's user avatar
  • 83
6 votes
1 answer
819 views

How can I create and initialize a schema for a embedded MySQL DB?

I want to create an embedded MySQL database for running tests, but I'm not sure how to do it. How do I initialize the database? How do I run my create table statements? I'm using Perl, so it needs ...
xenoterracide's user avatar