pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Martin Mueller <martinmueller@northwestern.edu>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: crosstab function
Date: Tue, 26 Feb 2019 18:04:17 -0800
Message-ID: <0322fd1d-542b-d549-10a3-c3ad40646578@aklaver.com> (raw)
In-Reply-To: <3B0E0069-18FC-476D-90A1-5201891AA52C@northwestern.edu>
References: <3B0E0069-18FC-476D-90A1-5201891AA52C@northwestern.edu>

On 2/26/19 5:51 PM, Martin Mueller wrote:
> I run Postgres 10.5.  I understand that there is something called 
> tablefunc and it includes a crosstab function. On Stack Overflow I learn 
> that you import this function. But from where and how?  The Postgres 
> documentation is quite clear and intelligible to a retired English 
> professor like me, but there is nothing in the Postgres documentation 
> about how to do the import, and a search for ‘import modules’ yields 
> nothing.

tablefunc is a contrib module so we need to know something information 
about your Postgres setup:

1) Your OS ?

2) How did you install Postgres?

> 
> I tried to emulate a Stack overflow query that does what I want to do, 
> but got an error message saying that the crosstab function doesn’t 
> exist. I tried
> 
> CREATEEXTENSION IFNOTEXISTStablefunc;
> 
> but it did nothing. It doesn’t seem to work  as import statements in 
> Python do

The above depends on the module code actually existing where CREATE 
EXTENSION can find it. Whether the module exists and where it exists 
depends on the answers to the questions above.

> 
> -----
> 
> Martin Mueller
> Professor emeritus of English and Classics
> 
> Northwestern University
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (23+ messages)  latest in thread

Message-ID: <0322fd1d-542b-d549-10a3-c3ad40646578@aklaver.com>
Permalink:  ../0322fd1d-542b-d549-10a3-c3ad40646578@aklaver.com/
Also on:    postgresql.org/message-id/0322fd1d-542b-d549-10a3-c3ad40646578@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, martinmueller@northwestern.edu
  Subject: Re: crosstab function
  In-Reply-To: <0322fd1d-542b-d549-10a3-c3ad40646578@aklaver.com>
  References: <3B0E0069-18FC-476D-90A1-5201891AA52C@northwestern.edu> <0322fd1d-542b-d549-10a3-c3ad40646578@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox