The stored procedure won’t just return the result of the last SELECT. You need to actually return the value:
CREATE OR REPLACE FUNCTION fun() RETURNS text AS $$ BEGIN --- .... RETURN(SELECT dblink_disconnect()); END $$ LANGUAGE plpgsql;
You’re getting the error because Postgres expects the function to return something of type text, but your function doesn’t return anything.
Related Posts:
- How to UPSERT (MERGE, INSERT … ON DUPLICATE UPDATE) in PostgreSQL?
- PostgreSQL: Remotely connecting to Postgres instance using psql command
- Postgres Error: More than one row returned by a subquery used as an expression
- api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft Office file [closed]
- Istio Ingress resulting in “no healthy upstream”
- What is a LAMP stack?
- What is the difference between POST and PUT in HTTP?
- What and where are the stack and heap?
- What is a reverse shell?
- Why am I getting error for apple-touch-icon-precomposed.png
- How could I ping @here in Discord.py?
- What’s the syntax for mod in java
- ‘git’ is not recognized as an internal or external command
- How to create Temp table with SELECT * INTO tempTable FROM CTE Query
- What are the rules of the std::cin object in C++?
- ssh remote host identification has changed
- How to link to part of the same document in Markdown?
- What is {{.}} in mustache?
- How to split column into two in R using separate
- What is a callback URL in relation to an API?
- Where do I find a list of all mat-icons — Angular
- TypeError : ‘method’ object is not subscriptable
- In C++, what is wx.h?
- What is the difference between allFile and allMarkdownRemark in gatsby
- How to restart Postgresql
- DynamoDB : The provided key element does not match the schema
- How do I run a single test using Jest?
- Why I am getting java.lang.AbstractMethodError errors?
- Mercurial: no ~/.hgrc file
- How to clamp an integer to some range?
- What is the iOS 8 System Font?
- PHP &$string – What does this mean?
- difference between ‘-webkit-box-shadow’ & ‘box-shadow’ in css
- java.util.NoSuchElementException: No line found
- Simple prime number generator in Python
- Update Git branches from master
- declaring a priority_queue in c++ with a custom comparator
- How to interactively (visually) resolve conflicts in SourceTree / git
- How to get the selected item from a ComboBox in JavaFX?
- ERROR: there is no unique constraint matching given keys for referenced table “bar”
- Function to calculate R2 (R-squared) in R
- Cannot simply use PostgreSQL table name (“relation does not exist”)
- SonarQube Runner vs Scanner
- You cannot add or change a record because a related record is required in table ‘table_name’
- Error in glm() in R
- Is there an online application that automatically draws tree structures for phrases/sentences?
- Create new tmux session from inside a tmux session
- classic ASP error ‘80020009’ Exception occurred
- Disable Chrome pinch zoom for use in kiosk
- How to ‘minify’ Javascript code
- “extra data after last expected column” while trying to import a csv file into postgresql
- postgresql: error duplicate key value violates unique constraint
- How to extract Month from date in R
- Receiving “message”:”CB-ACCESS-KEY header is required” when attempting to connect to coinbase pro api
- Error haskell: not in scope. What does that mean?
- Too small initial heap error – stanford parser
- How can I run a Java program in Atom editor?
- All com.android.support libraries must use the exact same version specification
- How can I run a program from a batch file without leaving the console open after the program starts?
- What is the difference between “JPG” / “JPEG” / “PNG” / “BMP” / “GIF” / “TIFF” Image?
- Error: “expected primary-expression before int”
- How do you detect where two line segments intersect?
- Get a list of URLs from a site
- How to get parameter value from query string?
- Using a regex
- Beacon UUID vs BeaconLayout
- Binary Tree Height
- Curl incosistent behaviour – CLI vs Java process
- how to upload a file to my server using html
- Difference between Chocolatey and NuGet
- Regex multiple match substring
- How to make a redirection that fired a script before redirecting?
- can you make changes to a theme in trac while it is waiting for review?
- Create post and update in the same flow [closed]
- Go top smooth function [closed]
- Any benefit or detriment from removing a pagefile on an 8 GB RAM machine?
- How do I view the details of a digital certificate .cer file?
- How do you validate fstab without rebooting?
- DNS – NSLOOKUP what is the meaning of the non-authoritative answer?
- Why can’t a CNAME record be used at the apex (aka root) of a domain?
- How can I upgrade to Java 1.8 on an Amazon Linux Server?
- What port should I open to allow remote desktop?
- Can you help me with my capacity planning?
- Cheat Sheets for System Administrators?
- Amazon EC2 terminology – AMI vs. EBS vs. Snapshot vs. Volume
- How to change an EC2 instance’s security group
- What type of DNS record is needed to make a subdomain?
- Multiple SSL domains on the same IP address and same port?
- IPTABLES – Limit rate of a specific incoming IP
- How to set default Ansible username/password for SSH connection?
- Can I make `find` return non-0 when no matching files are found?
- Proxy Error 502 “Reason: Error reading from remote server” with Apache 2.2.3 (Debian) mod_proxy and Jetty 6.1.18
- What is the difference between service and systemctl?
- Rsync creates a directory with the same name inside of destination directory
- How Often Do Windows Servers Need to be Restarted?
- sudoers: how to disable requiretty per user
- dig show only answer
- SSD or HDD for server
- Do you have any useful awk and grep scripts for parsing apache logs? [closed]