Search Postgresql Archives

Behavior of parameter holders in query containing a '$1'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

1) I'm reading the API documentation and I'm wondering how the client library would handle the following statement

INSERT INTO test (value1, value2) VALUES ('$1', $1)

Would it handle it incorrectly and would think that '$1' is the parameter or would it skip it because it know that it's a string value encapsulated in ''?

2) Can $1 be used more then one times for example if you want to use the same value for multiple column value?
UPDATE test set value1=$1,value2=$1

Thanks,

Eddy



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux