Re: pgTAP installation - Mailing list pgsql-general

From Vijaykumar Jain
Subject Re: pgTAP installation
Date
Msg-id CAM+6J94hGe0UK5tut5swtpbvfF-WeEzMUee0ztx6XO+nYfOyDQ@mail.gmail.com
Whole thread Raw
In response to pgTAP installation  (Ray O'Donnell <ray@rodonnell.ie>)
Responses Re: pgTAP installation  (Vijaykumar Jain <vijaykumarjain.github@gmail.com>)
List pgsql-general


On Sun, 20 Jun 2021 at 17:18, Ray O'Donnell <ray@rodonnell.ie> wrote:


gfc_booking6_dev=# select * from noplan();
ERROR:  function noplan() does not exist
LINE 1: select * from noplan();
                       ^
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.

Am I missing a step somewhere?

Many thanks in advance,

Ray.


--
Raymond O'Donnell // Galway // Ireland
ray@rodonnell.ie


postgres@db:~/postgresql-14beta1/contrib/pgtap$ psql test
psql (14beta1)
Type "help" for help.

test=# drop extension pgtap;
DROP EXTENSION
test=#
test=# \df
                       List of functions
 Schema | Name | Result data type | Argument data types | Type
--------+------+------------------+---------------------+------
(0 rows)

test=# \i './sql/pgtap.sql'  -- Load the TAP functions.
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION

test=# \df  -- check functions loaded
                                                                         List of functions
 Schema |             Name              |    Result data type    |                                   Argument data types
                    | Type
--------+-------------------------------+------------------------+----------------------------------------------------------------------
--------------------+------
 public | _add                          | integer                | text, integer
                    | func
 public | _add                          | integer                | text, integer, text


test=# SELECT * FROM no_plan();
 no_plan
---------
(0 rows)



I think you need to load the script to make use of the functions.
where it says
-- Load the TAP functions.
 


--
Thanks,
Vijay
Mumbai, India

pgsql-general by date:

Previous
From: Ray O'Donnell
Date:
Subject: pgTAP installation
Next
From: Vijaykumar Jain
Date:
Subject: Re: pgTAP installation