Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > If myValue is double quoted, then the values will automatically be > concatenated by the backend parser, but for strange (SQL-standard) reasons > you need a line break in between. That works for literals (single-quotes), but I don't think it applies

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Peter Eisentraut
Am Donnerstag, 19. August 2004 15:39 schrieb Fuchs Clemens: > Now I want to concatenate a variable value with a "hardcoded" value in my > script - something like: > > CREATE TABLE :myValue + _the_hardcoded_string .. Option 1: \set tmp :myValue 'hardcoded' CREATE TABLE :tmp ... Option 2: CRE

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Fuchs Clemens
Title: AW: [GENERAL] Pass parameters to SQL script thanks for tip - I'm nearly happy now. Now I want to concatenate a variable value with a "hardcoded" value in my script - something like: CREATE TABLE :myValue + _the_hardcoded_string .. Is this possib

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Daniel Martini
Hi, Citing Fuchs Clemens <[EMAIL PROTECTED]>: > is it possible to pass parameters to a SQL script, which I launch via the > psql shell? yes > In Oracle it works like that: > > sqlplus myscript.sql myschema > > and within the script I can use the parameter like this: > > CONC