Skip to main content
6 votes
Accepted

Where temp table data goes after creation?

Entries in pg_class, pg_attributes (and other related data in pg_catalog) along with empty related files are always created during every create temp table. I cannot refer to one place in the ...
Melkij's user avatar
  • 3,412
5 votes
Accepted

Kill infinite loop plperl

You are correct, CREATE FUNCTION foo() RETURNS void AS $$ while(1) {} $$ LANGUAGE plperl; SELECT * FROM foo(); Having called pg_terminate_backend and pg_cancel_backend that plperl backend ...
Evan Carroll's user avatar
  • 64.7k
4 votes

Installing a language with Amazon RDS?

You can't do this on RDS. The rds_superuser isn't a true superuser and cannot load any C-language extensions.
Craig Ringer's user avatar
  • 57.3k
3 votes
Accepted

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

This was unrelated to MySQL and was due to a change in the Perl DBD::mysql packages from version 4.013 to 4.042. Essentially, DBD::mysql now attempts to coerce the MySQL datatype into a Perl datatype. ...
Hans Van Slooten's user avatar
2 votes
Accepted

Plperlu func with column as param

Works for me. I'm guessing that curl just returns the empty string for the specific input you are using. create or replace function langDetect(str text) returns text as $$ use warnings; use ...
jjanes's user avatar
  • 41.3k
2 votes

How to create an alphanumeric sequence like AAAA0000 and so on

We can do this with a couple common table expressions (CTEs) that generate some simple series ... with letters as (select chr(i) as letter from generate_series(65,90) i), digits as (select lpad(i::...
markp-fuso's user avatar
  • 2,594
1 vote
Accepted

Reading data from oracle 8 in 2019

List of method (I know) to transfer data from one Oracle DB to another database link Data Pump (expdp/impdp) exp/imp SQL Developer -> Migrate Database custom script ( eg PERL ) CSV/XML Dump and ...
Michael Kutz's user avatar
  • 4,839
1 vote

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

Here are the short answers: '^[^@\s]+@([^@\s]+\.)+\w+$' and $lbl$^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])...
sinpamov's user avatar
1 vote

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

You should debug regexp by first just selecting the raw text make sure it is perceived at the textual level the way you want. select '\\A[^@\\s]\+@([^@\\s]+\\.)\+[^@\\W]\+\\z'; ?...
jjanes's user avatar
  • 41.3k
1 vote
Accepted

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

You should remove the parentheses from around the parameters for your stored procedure, and enclose the call in double quotation marks. In a normal command line, this would look like: sqlcmd -S ...
Laughing Vergil's user avatar
1 vote

Installing a language with Amazon RDS?

RDS has some languages already installed, but they do not allow you to install any package which isn't already there. From the RDS documentation on Extensions for PostgreSQL 9.6: The following ...
joanolo's user avatar
  • 13.6k
1 vote

Character Encoding in Postgres

\u0087 (END OF SELECTED AREA) and \u0081 are control characters in the LATIN-1 block. Displaying them as \u0087\u0081 is in fact the convention, and it seems to be what your terminal is doing. Can ...
Evan Carroll's user avatar
  • 64.7k
1 vote

Storing blobs outside the database

PostgreSQL has a method of storing blobs outside of the database. They called Large Objects. You may find they fit your needs. Internally, they do very much this. Except they use an OID. You can store ...
Evan Carroll's user avatar
  • 64.7k
1 vote
Accepted

pt-table-sync fails "Turning off AutoCommit"

I think the bug is in your copy of DBD::mysql which seems to have been fixed sometime before version 4.027. Make sure your copy of DBD::mysql is up to date. 4.041 was released in Nov of 2016. cpan ...
Evan Carroll's user avatar
  • 64.7k

Only top scored, non community-wiki answers of a minimum length are eligible