pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Automated scripting...
3+ messages / 3 participants
[nested] [flat]

* Automated scripting...
@ 2001-01-30 23:54  jkakar@expressus.com
  0 siblings, 2 replies; 3+ messages in thread

From: jkakar@expressus.com @ 2001-01-30 23:54 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I'm building a script to create a relatively large database.  At some
point in the script I would like to be able to save values into
variables so that I can use them to populate rows.

Is this possible with SQL?  My understanding is that it is not
possible but thought I'd ask anyway.

Thanks,
Jamu.

-- 
Jamu Kakar (Developer)			Expressus Design Studio, Inc.
jkakar@expressus.com			708-1641 Lonsdale Avenue
V: (604) 903-6994			North Vancouver, BC, V7M 2J5



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Automated scripting...
@ 2001-01-31 00:58  Christopher Sawtell <csawtell@xtra.co.nz>
  parent: jkakar@expressus.com
  1 sibling, 0 replies; 3+ messages in thread

From: Christopher Sawtell @ 2001-01-31 00:58 UTC (permalink / raw)
  To: jkakar@expressus.com; pgsql-sql

On Wed, 31 Jan 2001 12:54, jkakar@expressus.com wrote:
> Hi,
>
> I'm building a script to create a relatively large database.  At some
> point in the script I would like to be able to save values into
> variables so that I can use them to populate rows.
>
> Is this possible with SQL?  My understanding is that it is not
> possible but thought I'd ask anyway.

I know it seems a bit messy, but you could always use a temporary table to 
store the values.

-- 
Sincerely etc.,

 NAME       Christopher Sawtell
 CELL PHONE 021 257 4451
 ICQ UIN    45863470
 EMAIL      csawtell @ xtra . co . nz
 CNOTES     ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz

 -->> Please refrain from using HTML or WORD attachments in e-mails to me <<--




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Automated scripting...
@ 2001-01-31 17:25  Albert REINER <areiner@tph.tuwien.ac.at>
  parent: jkakar@expressus.com
  1 sibling, 0 replies; 3+ messages in thread

From: Albert REINER @ 2001-01-31 17:25 UTC (permalink / raw)
  To: pgsql-sql

Saluton,

On Tue, Jan 30, 2001 at 03:54:53PM -0800, jkakar@expressus.com wrote:
...
> I'm building a script to create a relatively large database.  At some
> point in the script I would like to be able to save values into
> variables so that I can use them to populate rows.

Your script will be handled via psql, right? Then you can use \set and
interpolation, as described in `man psql`.

Albert.


-- 

--------------------------------------------------------------------------
Albert Reiner                                   <areiner@tph.tuwien.ac.at>
Deutsch       *       English       *       Esperanto       *       Latine
--------------------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-01-31 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-30 23:54 Automated scripting... jkakar@expressus.com
2001-01-31 00:58 ` Christopher Sawtell <csawtell@xtra.co.nz>
2001-01-31 17:25 ` Albert REINER <areiner@tph.tuwien.ac.at>

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