Re: AW: [HACKERS] Getting OID in psql of recent insert
От | Peter Eisentraut |
---|---|
Тема | Re: AW: [HACKERS] Getting OID in psql of recent insert |
Дата | |
Msg-id | Pine.LNX.4.20.9911222254330.417-100000@localhost.localdomain обсуждение исходный текст |
Ответ на | AW: [HACKERS] Getting OID in psql of recent insert (Zeugswetter Andreas SEV <ZeugswetterA@wien.spardat.at>) |
Ответы |
Re: AW: [HACKERS] Getting OID in psql of recent insert
Re: AW: [HACKERS] Getting OID in psql of recent insert |
Список | pgsql-hackers |
On 1999-11-22, Zeugswetter Andreas SEV mentioned: > > testdb=> \set singlestep on > > testdb=> \set sql_interpol '#' > > testdb=> \set foo 'pg_class' > > testdb=> select * from #foo#; > > This is great, but may I object to the syntax ? > The standard sql way to use host variables seems to be: > select * from :foo where id = :id > > There will always be the problem with conflicting operators, > and this one syntax, already needed by ecpg, it is hard enough. I just pulled that syntax out of my hat, since it was the most non-interfering way to go for now, but thanks for the tip, I'll be on the task in a second. Of course, since the SQL standard is such a widely available document, I should have found that myself ;) Is there also a rule on what those variables can contain? I mean currently they act like C macros, they can contain unbalances quotes, incomplete backslash commands, everything. Or should they be restricted to SQL? Also, looking for possible conflicts here, it seems that there is an operator ':' for exponentiation, which is of course extremely mnemonic. This reminds me of the ';' operator for logarithms, which I also use all the time in mathematical writing. Are those operators actually standard or just somebody's personal idea? For example, what does this mean: play=> select value, :value from test;value | ?column? -------+---------------------- 5 | 148.413159102577 6 | 403.428793492735 99 | 9.88903031934695e+42 (3 rows) Similarly for the ';' operator, where there are obvious problems. Rationale anybody? Are they from PostQUEL times? Um, okay, this goes even further. There seem to be functions called log and dlog1 as well as exp and dexp with essentially the same functionality; the one with the 'd' goes with float8 arguments, the other one with numeric. Is this making sense to anybody? -Peter -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
В списке pgsql-hackers по дате отправления: