pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: J.A. <postgresql@world-domination.com.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Erik Wienhold <ewie@ewie.name>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: PL/pgSQL doesn't support variables in queries?
Date: Wed, 3 May 2023 07:56:24 -0700
Message-ID: <b92038e6-87b4-eaa5-9975-2177cd93e505@aklaver.com> (raw)
In-Reply-To: <CALT+_gsMv7JuK1WYH9Ubch6d=i6HEOo_02V=ym48=7LiTVa5RA@mail.gmail.com>
References: <CALT+_gvfHtF5jqQg+J2suw3hOEh3ZWjZQDB8jJ945o4b1ekyyQ@mail.gmail.com>
	<658455455.1152531.1683117585087@office.mailbox.org>
	<CALT+_gtnW+6GJ95EVJtP9P5fVHfYaOSX1fsrsRddshGob=kCkg@mail.gmail.com>
	<2955822.1683120535@sss.pgh.pa.us>
	<CALT+_gsMv7JuK1WYH9Ubch6d=i6HEOo_02V=ym48=7LiTVa5RA@mail.gmail.com>

On 5/3/23 07:34, J.A. wrote:
> Ah - I think I'm starting to follow.
> 
> what i was _trying_ to do is this
> 
> get value from a column and stick it into a variable.
> 
> now select * from a _number_ of tables and return a -multi recordsets- 
> from this single query. I'm not sure if that is the same terminology, in 
> pgsql?
> 
> So is this possible?

Many things are possible and they are covered in the documentation:

https://www.postgresql.org/docs/current/plpgsql.html

Read through that and you will find your questions answered.

> 
> -JA-
> 

> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (9+ messages)

Message-ID: <b92038e6-87b4-eaa5-9975-2177cd93e505@aklaver.com>
Permalink:  ../b92038e6-87b4-eaa5-9975-2177cd93e505@aklaver.com/
Also on:    postgresql.org/message-id/b92038e6-87b4-eaa5-9975-2177cd93e505@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, postgresql@world-domination.com.au, tgl@sss.pgh.pa.us, ewie@ewie.name
  Subject: Re: PL/pgSQL doesn't support variables in queries?
  In-Reply-To: <b92038e6-87b4-eaa5-9975-2177cd93e505@aklaver.com>
  References: <CALT+_gvfHtF5jqQg+J2suw3hOEh3ZWjZQDB8jJ945o4b1ekyyQ@mail.gmail.com> <658455455.1152531.1683117585087@office.mailbox.org> <CALT+_gtnW+6GJ95EVJtP9P5fVHfYaOSX1fsrsRddshGob=kCkg@mail.gmail.com> <2955822.1683120535@sss.pgh.pa.us> <CALT+_gsMv7JuK1WYH9Ubch6d=i6HEOo_02V=ym48=7LiTVa5RA@mail.gmail.com> <b92038e6-87b4-eaa5-9975-2177cd93e505@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