Re: how many quotes?
| От | Richard Huxton |
|---|---|
| Тема | Re: how many quotes? |
| Дата | |
| Msg-id | 200312021712.51653.dev@archonet.com обсуждение исходный текст |
| Ответ на | how many quotes? (Franco Bruno Borghesi <franco@akyasociados.com.ar>) |
| Ответы |
Re: how many quotes?
|
| Список | pgsql-general |
On Tuesday 02 December 2003 16:12, Franco Bruno Borghesi wrote:
> I need a function to fetch the nextval of a sequence (it should do other
> things, but my problem is the nextval() call), like this:
>
> CREATE OR REPLACE FUNCTION test() RETURNS INTEGER AS '
> DECLARE
> val INTEGER;
> BEGIN
> val:=SELECT nextval(''''''''''usuarios_seq'''''''''');
> I can't figure out how many quotes I should use to call nextval. I've
> read an article at the techdocs about this, but didn't help me. If
> anyone knows the *magic* number, please tell me :)
Two, or escape them:
nextval(''usuarios_seq'')
or
nextval(\'usuarios_seq\')
--
Richard Huxton
Archonet Ltd
В списке pgsql-general по дате отправления: