skip to Main Content

How to return data in login function in PL/pgSQL? I want to return table where email and password matches. Email is unique – Postgresql

The function doesn't throw any error nor does it show any return value. CREATE OR REPLACE FUNCTION login(iemail VARCHAR,ipassword VARCHAR) RETURNS TABLE(id INTEGER, name VARCHAR, lastName VARCHAR, age INTEGER, mobile VARCHAR,email VARCHAR) LANGUAGE 'plpgsql' AS $$ #variable_conflict use_variable BEGIN RETURN…

VIEW QUESTION

Data not getting inserted into database, despite of 201 request status – postgresql express js

I am using Typescript, Express, PostgresDB. Here is my code for connecting to the database cluster. import { Pool } from "pg"; const myPool = new Pool({ host: `${process.env.DATABASE_URL}`, //somedb.abc.us-east-1.rds.amazonaws.com database: `${process.env.DATABASE_NAME}`, //dbName user: `${process.env.DATABASE_USER}`, //dbUser password: `${process.env.DATABASE_PASSWORD}`, //dbPassword port:…

VIEW QUESTION
Back To Top
Search